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

[lintian] 02/02: Avoid false-positives when detecting Twitter's bootstrap library. (Closes: #888972)



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

lamby pushed a commit to branch master
in repository lintian.

commit 5ea4c7ea6231d28b3d4247c3ddddaeda2834ae2b
Author: Chris Lamb <lamby@debian.org>
Date:   Thu Feb 1 23:06:33 2018 +0000

    Avoid false-positives when detecting Twitter's bootstrap library. (Closes: #888972)
---
 data/files/js-libraries                        | 2 +-
 debian/changelog                               | 3 +++
 t/tests/files-embedded/debian/bootstrap-1.1.js | 2 +-
 t/tests/files-embedded/debian/bootstrap.js     | 1 +
 t/tests/files-embedded/debian/debian/install   | 3 ++-
 5 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/data/files/js-libraries b/data/files/js-libraries
index 17b1411..37a18c3 100644
--- a/data/files/js-libraries
+++ b/data/files/js-libraries
@@ -43,7 +43,7 @@ libjs-prototype              ~~ (?i)/prototype(?:-[\d\.]+)?$EXT
 libjs-raphael                ~~ (?i)/raphael(?:[\.-]min)?$EXT
 libjs-scriptaculous          ~~ (?i)/scriptaculous$EXT
 libjs-strophe                ~~ (?i)/strophe$EXT
-libjs-twitter-bootstrap      ~~ (?i)/bootstrap(?:-[\d\.]+)?$EXT$ ~~ Twitter
+libjs-twitter-bootstrap      ~~ (?i)/bootstrap(?:-[\d\.]+)?$EXT$ ~~ var (Carousel|Typeahead)
 libjs-underscore             ~~ (?i)/underscore$EXT
 libjs-yui                    ~~ (?i)/(?:yahoo|yui)-(?:dom-event)?$EXT
 # Disabled due to false positives.  Needs a content check adding to verify
diff --git a/debian/changelog b/debian/changelog
index 5579e0a..19cff1b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -70,6 +70,9 @@ lintian (2.5.73) UNRELEASED; urgency=medium
   * data/debhelper/dh_commands-manual:
     + [NT] Remove dh_systemd* entries.  Debian stable have a recent
       enough version of debhelper that this entry no longer matters.
+  * data/files/js-libraries:
+    + [CL] Avoid false-positives when detecting Twitter's bootstrap
+      library.  (Closes: #888972)
   * data/files/python-generic-modules:
     + [CL] Detect "backports" (and "backport") as overly generic Python
       module names.  (Closes: #888559)
diff --git a/t/tests/files-embedded/debian/bootstrap-1.1.js b/t/tests/files-embedded/debian/bootstrap-1.1.js
index 6d56007..d9c3762 100644
--- a/t/tests/files-embedded/debian/bootstrap-1.1.js
+++ b/t/tests/files-embedded/debian/bootstrap-1.1.js
@@ -1 +1 @@
-This is an embedded javascript library
+This is an embedded javascript library from Twitter that uses "var Carousel";
diff --git a/t/tests/files-embedded/debian/bootstrap.js b/t/tests/files-embedded/debian/bootstrap.js
new file mode 100644
index 0000000..896075b
--- /dev/null
+++ b/t/tests/files-embedded/debian/bootstrap.js
@@ -0,0 +1 @@
+// https://developer.mozilla.org/en-US/docs/Extensions/bootstrap.js false positive
diff --git a/t/tests/files-embedded/debian/debian/install b/t/tests/files-embedded/debian/debian/install
index 3756496..b89e613 100644
--- a/t/tests/files-embedded/debian/debian/install
+++ b/t/tests/files-embedded/debian/debian/install
@@ -1,6 +1,7 @@
 IPv4.php usr/share/php
 jquery*  usr/share/php
-bootstrap*  usr/share/php
+bootstrap-*  usr/share/php
+bootstrap.js  usr/share/xul-ext/lintian
 feedparser.py usr/share/php
 streams.php usr/share/php
 streams.php usr/share/php/pomo

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


Reply to: