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

[lintian] 01/01: Avoid a source-is-missing by detecting pango doc



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

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

commit ccd0b3f45d2e1d85b0a0fd1877e1399f2b34923a
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Sat Jan 30 20:22:18 2016 +0100

    Avoid a source-is-missing by detecting pango doc
    
    Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
 checks/cruft.desc                                              | 10 ++++++++++
 checks/cruft.pm                                                |  6 ++++++
 debian/changelog                                               |  1 +
 .../debian/oldfalsepositives/pango/search_index.js             |  4 ++++
 t/tests/cruft-minified-js/tags                                 |  1 +
 5 files changed, 22 insertions(+)

diff --git a/checks/cruft.desc b/checks/cruft.desc
index 6abc24e..e8c0e3c 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -524,6 +524,16 @@ Info: The source tarball contains prebuilt Sphinx documentation.
  .
  It is preferable to rebuild documentation directly from source.
 
+Tag: source-contains-prebuilt-pango-documentation
+Severity: pedantic
+Certainty: possible
+Info: The source tarball contains prebuilt pango documentation.
+ This is usually left by mistake when generating the tarball without
+ first cleaning the source directory.  You may want to report this as
+ an upstream bug, if there is no sign that this was intended.
+ .
+ It is preferable to rebuild documentation directly from source.
+
 Tag: source-contains-prebuilt-doxygen-documentation
 Severity: pedantic
 Certainty: possible
diff --git a/checks/cruft.pm b/checks/cruft.pm
index 2e8950a..0595b29 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -946,6 +946,12 @@ sub _search_in_block0 {
                 return;
             }
         }
+        if($basename eq 'search_index.js') {
+            if($block =~ m/\A\s*var\s*search_index\s*=/xms) {
+                tag 'source-contains-prebuilt-pango-documentation', $dirname;
+                return;
+            }
+        }
         # false positive in dx package at least
         elsif($basename eq 'srchidx.js') {
             if($block =~ m/\A\s*profiles \s* = \s* new \s* Array\s*\(/xms) {
diff --git a/debian/changelog b/debian/changelog
index 781815d..0ec7277 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ lintian (2.5.41) UNRELEASED; urgency=medium
   * checks/cruft.{desc,pm}:
     + [BR] Filter some simple comments for long line in source-is-missing
       (Closes: #798900).
+    + [BR] Detect pango docs avoiding source-is-missing warning.
   * checks/files.pm:
     + [JW] Treat packages without Multi-Arch field as if they had
       "Multi-Arch: no".  Thanks to Bas Couwenberg for the bug report.
diff --git a/t/tests/cruft-minified-js/debian/oldfalsepositives/pango/search_index.js b/t/tests/cruft-minified-js/debian/oldfalsepositives/pango/search_index.js
new file mode 100644
index 0000000..077c6f7
--- /dev/null
+++ b/t/tests/cruft-minified-js/debian/oldfalsepositives/pango/search_index.js
@@ -0,0 +1,4 @@
+var search_index = [
+'ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION''ALLEGRO_CONFIG','ALLEGRO_CONFIG_SECTION','ALLEGRO_CONFIG','ALLEGRO_CONFIG [...]
+var search_urls = [
+'config.html#allegro_config','config.html#allegro_config_section'];
diff --git a/t/tests/cruft-minified-js/tags b/t/tests/cruft-minified-js/tags
index 20e0229..cba15cc 100644
--- a/t/tests/cruft-minified-js/tags
+++ b/t/tests/cruft-minified-js/tags
@@ -25,3 +25,4 @@ P: cruft-minified-js source: source-contains-prebuilt-javascript-object usr/shar
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object usr/share/javascript/minwithoutsource/notsourced.min.js
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object usr/share/javascript/sourced/sourced.min.js
 P: cruft-minified-js source: source-contains-prebuilt-javascript-object usr/share/javascript/sourced_variant/sourced.min.js
+P: cruft-minified-js source: source-contains-prebuilt-pango-documentation oldfalsepositives/pango/

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


Reply to: