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

[lintian] 01/01: Fix a false positive source-is-missing by checking -nc.js suffix



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

broucaries-guest pushed a commit to branch master
in repository lintian.

commit a8165d8752a3a11c0fb81e8ce3031e4bef3a50ad
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Wed Jun 10 10:16:55 2015 +0200

    Fix a false positive source-is-missing by checking -nc.js suffix
    
    Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
 data/cruft/warn-file-type                                            | 2 +-
 debian/changelog                                                     | 3 +++
 t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-nc.js | 1 +
 t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-yc.js | 4 ++++
 t/tests/cruft-minified-js/tags                                       | 1 +
 5 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/data/cruft/warn-file-type b/data/cruft/warn-file-type
index ac669b5..3ab17ae 100644
--- a/data/cruft/warn-file-type
+++ b/data/cruft/warn-file-type
@@ -11,7 +11,7 @@ source-contains-prebuilt-flash-object       ~~ ^Macromedia \s Flash
 source-contains-prebuilt-flash-project      ~~ ^Composite \s Document \s File                                            ~~ (?i)\.fla$                        ~~ s/(?i)\.fla$/.as/
 source-contains-prebuilt-java-object        ~~ (?: Java [ ] (?:Jar [ ] file|archive [ ] data) | Zip [ ] archive | JAR)   ~~ (?i)\.jar$
 # do not forget to change also $JS_EXT in file.pm
-source-contains-prebuilt-javascript-object  ~~ .*                                                                        ~~ (?i)[-._](?:compiled|compressed|lite|min|pack(?:ed)?|yc)\.js$ ~~ map{'s/(?i)(?:[-._](?:compiled|compressed|lite|min|pack(?:ed)?|yc))?\.js$/'.$_.'/'} qw(.js _orig.js .js.orig .src.js .debug.js -debug.js)
+source-contains-prebuilt-javascript-object  ~~ .*                                                                        ~~ (?i)[-._](?:compiled|compressed|lite|min|pack(?:ed)?|yc)\.js$ ~~ map{'s/(?i)(?:[-._](?:compiled|compressed|lite|min|pack(?:ed)?|yc))?\.js$/'.$_.'/'} qw(.js _orig.js .js.orig .src.js .debug.js -debug.js -nc.js)
 # ok chm could be created from docbook or texi
 source-contains-prebuilt-ms-help-file       ~~ ^MS \s Windows \s Html \s? Help \s Data ~~  (?i)\.chm$
 source-contains-prebuilt-python-object      ~~ ^python \s \d(\.\d+)? \s byte-compiled                                    ~~ .*                                ~~ s/(?i)(?:\.cpython-\d{2}|\.pypy)?\.py[co]$/.py/
diff --git a/debian/changelog b/debian/changelog
index 46cb0e5..c3e8b75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -65,6 +65,9 @@ lintian (2.5.32) UNRELEASED; urgency=medium
     + [BR] Detect autogenerated gperf data.  (Closes: #762179).
   * data/cruft/missing-dir-search-path:
     + [BR] Fix a false positive in fspy for source-is-missing.
+  * data/cruft/warn-file-type:
+    + [BR] Fix a false positive source-is-missing by checking
+      -nc.js suffix.
   * data/debhelper/*:
     + [NT] Refresh against unstable to pick up the rename of
       libaqbanking-dev.  Thanks to Micha Lenk for the reminder.
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-nc.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-nc.js
new file mode 100644
index 0000000..620611a
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-nc.js
@@ -0,0 +1 @@
+//the source see zoneminder
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-yc.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-yc.js
new file mode 100644
index 0000000..e1a0655
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/-nc.js/test-yc.js
@@ -0,0 +1,4 @@
+// a very long javascript yuic compressed
+/* simulate a long line */
+var longline = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
+
diff --git a/t/tests/cruft-minified-js/tags b/t/tests/cruft-minified-js/tags
index eb4ffab..c66dade 100644
--- a/t/tests/cruft-minified-js/tags
+++ b/t/tests/cruft-minified-js/tags
@@ -2,6 +2,7 @@ E: cruft-minified-js source: source-is-missing deployJava/deployJava.js
 E: cruft-minified-js source: source-is-missing usr/share/javascript/jswithoutminextwithoutsource/jsonnotsourced.js
 E: cruft-minified-js source: source-is-missing usr/share/javascript/minwithoutsource/notsourced.min.js
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object oldfalsepositives/-debug.js/test-min.js
+P: cruft-minified-js source: source-contains-prebuilt-javascript-object oldfalsepositives/-nc.js/test-yc.js
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object oldfalsepositives/debug.js/testdebug.js mean line is about NUMBER characters
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object oldfalsepositives/src.js/test.min.js
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object oldfalsepositives/suffix/test-compiled.js

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


Reply to: