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

[lintian] 01/01: Avoid false positives in missing source checks for "CSS Browser Selector". (Closes: #874381)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 72d95b8ee796cafcdc05d4c612d1b435b9c37302
Author: Chris Lamb <lamby@debian.org>
Date:   Tue Sep 5 22:24:35 2017 +0100

    Avoid false positives in missing source checks for "CSS Browser Selector". (Closes: #874381)
---
 checks/cruft.pm                                                   | 5 +++++
 debian/changelog                                                  | 2 ++
 .../debian/oldfalsepositives/css_browser_selector.js              | 8 ++++++++
 3 files changed, 15 insertions(+)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index 58c2191..568f89e 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -973,6 +973,11 @@ sub _search_in_block0 {
                 return;
             }
         }
+        # https://github.com/rafaelp/css_browser_selector is actually the
+        # original source. (#874381)
+        elsif ($block =~ m/css browser selector/) {
+            return;
+        }
         # now search hidden minified
         _linelength_test($entry, $info, $name, $basename, $dirname,$block);
     }
diff --git a/debian/changelog b/debian/changelog
index 986c271..bb90f6e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,6 +40,8 @@ lintian (2.5.53) UNRELEASED; urgency=medium
       (Closes: #872843)
     + [CL] Don't match quoted "FIXME" variants as they are almost always
       deliberate. Thanks to Adrian Bunk for the report.  (Closes: #870199)
+    + [CL] Avoid false positives in missing source checks for "CSS Browser
+      Selector".  (Closes: #874381)
   * checks/debhelper.pm:
     + [CL] Prevent a false positive of
       missing-build-dependency-for-dh_-command that can be exposed by
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/css_browser_selector.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/css_browser_selector.js
new file mode 100644
index 0000000..0668aa7
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/css_browser_selector.js
@@ -0,0 +1,8 @@
+/*
+CSS Browser Selector v0.4.0 (Nov 02, 2010)
+Rafael Lima (http://rafael.adm.br)
+http://rafael.adm.br/css_browser_selector
+License: http://creativecommons.org/licenses/by/2.5/
+Contributors: http://rafael.adm.br/css_browser_selector#contributors
+*/
+function css_browser_selector(u){var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is [...]

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


Reply to: