[lintian] 01/01: Fix a flase positive in missing dir handling
This is an automated email from the git hooks/post-receive script.
broucaries-guest pushed a commit to branch master
in repository lintian.
commit 3bd2d53d08be07fff7e894ee77a64ecb8c801eaa
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date: Thu Sep 3 22:06:06 2015 +0200
Fix a flase positive in missing dir handling
---
checks/cruft.pm | 7 ++++++-
debian/changelog | 2 ++
.../debian/oldfalsepositives/-debug.js/{ => src}/test-debug.js | 0
.../debian/oldfalsepositives/-debug.js/{ => src}/test-min.js | 0
.../cruft-minified-js/debian/oldfalsepositives/nested-dir/README | 1 +
.../debian/oldfalsepositives/nested-dir/dist/fake.min.js | 2 ++
.../debian/oldfalsepositives/nested-dir/src/fake.js | 2 ++
7 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/checks/cruft.pm b/checks/cruft.pm
index 69cc690..96afcf8 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -794,7 +794,12 @@ sub check_missing_source {
}
# relative path
else {
- $newpath = normalize_pkg_path($dirname.'/'.$newbasename);
+ $newpath
+ = normalize_pkg_path($dirname.'/'.$path.'/'.$newbasename);
+ }
+ # path outside package
+ if(!defined($newpath)) {
+ next PATH;
}
# ok we get same name => next
if($newpath eq $name) {
diff --git a/debian/changelog b/debian/changelog
index 3080b0f..502df9e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ lintian (2.5.37) UNRELEASED; urgency=medium
(Closes: #795955).
+ [BR] Performance improvement check if line < 1024 before
stripping comment. Classify to minified if line > 1024.
+ + [BR] Fix false positive in missing-sources directory
+ search path.
* checks/description.pm:
+ [AB] Fix false positives in
perl-module-name-not-mentioned-in-description. (Closes: #795779)
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/test-debug.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/src/test-debug.js
similarity index 100%
rename from t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/test-debug.js
rename to t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/src/test-debug.js
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/test-min.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/src/test-min.js
similarity index 100%
rename from t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/test-min.js
rename to t/tests/cruft-minified-js/debian/oldfalsepositives/-debug.js/src/test-min.js
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/README b/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/README
new file mode 100644
index 0000000..2db2f0f
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/README
@@ -0,0 +1 @@
+exercice missing dir in relative dir
\ No newline at end of file
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/dist/fake.min.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/dist/fake.min.js
new file mode 100644
index 0000000..3e0e3c2
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/dist/fake.min.js
@@ -0,0 +1,2 @@
+// fake min.js
+toto='1';
\ No newline at end of file
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/src/fake.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/src/fake.js
new file mode 100644
index 0000000..772fe5c
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/nested-dir/src/fake.js
@@ -0,0 +1,2 @@
+// fake source
+toto='1';
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: