[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: Prevent false positives in desktop-entry-lacks-keywords-entry for "Link" .desktop files. (Closes: #873702)



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 802e5b42ec94f0be27956cd01e1644dc2a800f87
Author: Chris Lamb <lamby@debian.org>
Date:   Thu Aug 31 10:19:35 2017 +0100

    Prevent false positives in desktop-entry-lacks-keywords-entry for "Link" .desktop files. (Closes: #873702)
---
 checks/menu-format.pm                                     | 2 +-
 debian/changelog                                          | 3 +++
 t/tests/menu-format-desktop-general/debian/debian/install | 1 +
 t/tests/menu-format-desktop-general/debian/link.desktop   | 6 ++++++
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/checks/menu-format.pm b/checks/menu-format.pm
index 3de4490..be1a1c4 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}) {
+        if (!defined $vals{Keywords} && $vals{'Type'} ne 'Link') {
             tag 'desktop-entry-lacks-keywords-entry', $file;
         }
     }
diff --git a/debian/changelog b/debian/changelog
index 5bf439b..cf05ba5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,9 @@ lintian (2.5.53) UNRELEASED; urgency=medium
   * checks/java.pm:
     + [CL] Additionally consider .cljc files as code to avoid false-
       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)
   * 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 4463089..070f2e1 100644
--- a/t/tests/menu-format-desktop-general/debian/debian/install
+++ b/t/tests/menu-format-desktop-general/debian/debian/install
@@ -4,3 +4,4 @@ general.desktop      usr/share/applications
 missing.desktop      usr/share/applications
 reserved-bad.desktop usr/share/applications
 reserved.desktop     usr/share/applications
+link.desktop         usr/share/applications
diff --git a/t/tests/menu-format-desktop-general/debian/link.desktop b/t/tests/menu-format-desktop-general/debian/link.desktop
new file mode 100644
index 0000000..9f20d7c
--- /dev/null
+++ b/t/tests/menu-format-desktop-general/debian/link.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Type=Link
+Name=link
+Icon=link
+Comment=This is Type=Link and thus does not require a Keywords key
+URL=http://example.com/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: