[lintian] 01/01: Also avoid false positives for Type=Directory .desktop files.
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch false-positive-desktop-entry-lacks-keywords-entry-873702
in repository lintian.
commit 907507fc9e300f6c63ec09c3047d9729eeeb7a20
Author: Chris Lamb <lamby@debian.org>
Date: Thu Aug 31 10:56:04 2017 +0100
Also avoid false positives for Type=Directory .desktop files.
---
checks/menu-format.pm | 2 +-
debian/changelog | 2 +-
t/tests/menu-format-desktop-general/debian/debian/install | 1 +
t/tests/menu-format-desktop-general/debian/directory.desktop | 5 +++++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/checks/menu-format.pm b/checks/menu-format.pm
index be1a1c4..5c88af3 100644
--- a/checks/menu-format.pm
+++ b/checks/menu-format.pm
@@ -641,7 +641,7 @@ sub verify_desktop_file {
if (!defined $vals{Icon}) {
tag 'desktop-entry-lacks-icon-entry', $file;
}
- if (!defined $vals{Keywords} && $vals{'Type'} ne 'Link') {
+ if (!defined $vals{Keywords} && $vals{'Type'} eq 'Application') {
tag 'desktop-entry-lacks-keywords-entry', $file;
}
}
diff --git a/debian/changelog b/debian/changelog
index cf05ba5..59b4f03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -62,7 +62,7 @@ lintian (2.5.53) UNRELEASED; urgency=medium
positive codeless-jar warnings. (Closes: #870649)
* checks/menu-format.desc:
+ [CL] Prevent false positives in desktop-entry-lacks-keywords-entry
- for "Link" .desktop files. (Closes: #873702)
+ for "Link" and "Directory" .desktop files. (Closes: #873702)
* checks/python.{pm,desc}:
+ [CL] Split out Python checks from "scripts" check to a new, source
check of type "source".
diff --git a/t/tests/menu-format-desktop-general/debian/debian/install b/t/tests/menu-format-desktop-general/debian/debian/install
index 070f2e1..ae6f6ea 100644
--- a/t/tests/menu-format-desktop-general/debian/debian/install
+++ b/t/tests/menu-format-desktop-general/debian/debian/install
@@ -5,3 +5,4 @@ missing.desktop usr/share/applications
reserved-bad.desktop usr/share/applications
reserved.desktop usr/share/applications
link.desktop usr/share/applications
+directory.desktop usr/share/applications
diff --git a/t/tests/menu-format-desktop-general/debian/directory.desktop b/t/tests/menu-format-desktop-general/debian/directory.desktop
new file mode 100644
index 0000000..0a450bc
--- /dev/null
+++ b/t/tests/menu-format-desktop-general/debian/directory.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=Directory
+Name=link
+Icon=link
+Comment=This is Type=Directory and thus does not require a Keywords key
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: