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

[lintian] 01/01: Detect autogenerated microsoft visual c++ file



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

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

commit ed82c7f93abd2a35aee885a3e3a205b91634ad9b
Author: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
Date:   Tue Jul 15 22:15:33 2014 +0200

    Detect autogenerated microsoft visual c++ file
    
    It take place in the archive.
    
    Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+debian@gmail.com>
---
 checks/cruft.desc                                            | 12 ++++++++++++
 data/cruft/non-free-license                                  |  4 +++-
 .../cruft-autogenerated-visual-cpp/debian/src/negative.py    |  5 +++++
 .../cruft-autogenerated-visual-cpp/debian/src/positive.cpp   |  4 ++++
 t/tests/cruft-autogenerated-visual-cpp/desc                  |  8 ++++++++
 t/tests/cruft-autogenerated-visual-cpp/tags                  |  1 +
 6 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/checks/cruft.desc b/checks/cruft.desc
index 3f30115..57fb590 100644
--- a/checks/cruft.desc
+++ b/checks/cruft.desc
@@ -727,3 +727,15 @@ Info: The source of the following file is missing. Lintian checked a few
  "debian/missing-sources" directory.
  .
  If this is a false-positive, please report a bug against Lintian.
+
+Tag: autogenerated-visual-c++-file
+Severity: pedantic
+Certainty: possible
+Info: The following file is autogenerated by Microsoft Visual C++.
+ .
+ They are usually provided for the convenience of users.  These files
+ usually just take up space in the tarball and are of no use in Debian.
+ .
+ Check if upstream also provides source-only tarballs that you can use as
+ the upstream distribution instead.  If not, you may want to ask upstream
+ to provide source-only tarballs.
diff --git a/data/cruft/non-free-license b/data/cruft/non-free-license
index 1705549..b21cca6 100644
--- a/data/cruft/non-free-license
+++ b/data/cruft/non-free-license
@@ -20,4 +20,6 @@ license-problem-non-free-RFC-BCP78 ~~ license && document && bcp && restriction
 license-problem-gfdl-invariants ~~ license && document && gnu && copy && documentation ~~ gnu free documentation license ~~ (?'rawcontextbefore'(?:(?:(?!a [ ] copy [ ] of [ ] the [ ] license [ ] is).){1024}|(?:[ ] copy [ ] of [ ] the [ ] license [ ] is.{0,1024}?))) gnu [ ] free [ ] documentation [ ] license (?'rawgfdlsections'(?:(?!gnu [ ] free [ ] documentation [ ] license).){0,1024}?) (?:a [ ] copy [ ] of [ ] the [ ] license [ ] is|this [ ] document [ ] is [ ] distributed)  ~~ (?'rawco [...]
 # php license
 license-problem-php-license ~~ www.php.net && group@php.net && phpfoo && conjunction && php ~~ this product includes php ~~ php [ ] license [ ]?[,;][ ]? version [ ] 3(?:\.\d+)? ~~ ~~ php-source-whitelist
-license-problem-bad-php-license ~~ www.php.net && add-on && conjunction ~~ this product includes php ~~ php [ ] license [ ]?[,;][ ]? version [ ] 2(?:\.\d+)? ~~ ~~ php-source-whitelist
\ No newline at end of file
+license-problem-bad-php-license ~~ www.php.net && add-on && conjunction ~~ this product includes php ~~ php [ ] license [ ]?[,;][ ]? version [ ] 2(?:\.\d+)? ~~ ~~ php-source-whitelist
+# not really a license but warn it: visual c++ generated file
+autogenerated-visual-c++-file ~~ microsoft && visual && generated ~~ microsoft visual c++ generated ~~ microsoft [ ] visual [ ] c[+][+] [ ] generated (?![ ] by [ ] freeze\.py)
\ No newline at end of file
diff --git a/t/tests/cruft-autogenerated-visual-cpp/debian/src/negative.py b/t/tests/cruft-autogenerated-visual-cpp/debian/src/negative.py
new file mode 100644
index 0000000..3c7da65
--- /dev/null
+++ b/t/tests/cruft-autogenerated-visual-cpp/debian/src/negative.py
@@ -0,0 +1,5 @@
+def realwork(vars, moddefns, target):
+    version_suffix = "%r%r" % sys.version_info[:2]
+    print "# Makefile for Microsoft Visual C++ generated by freeze.py script"
+    print
+    print 'target = %s' % target
\ No newline at end of file
diff --git a/t/tests/cruft-autogenerated-visual-cpp/debian/src/positive.cpp b/t/tests/cruft-autogenerated-visual-cpp/debian/src/positive.cpp
new file mode 100644
index 0000000..5d3f004
--- /dev/null
+++ b/t/tests/cruft-autogenerated-visual-cpp/debian/src/positive.cpp
@@ -0,0 +1,4 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by vtkDLG.rc
+//
\ No newline at end of file
diff --git a/t/tests/cruft-autogenerated-visual-cpp/desc b/t/tests/cruft-autogenerated-visual-cpp/desc
new file mode 100644
index 0000000..06604c1
--- /dev/null
+++ b/t/tests/cruft-autogenerated-visual-cpp/desc
@@ -0,0 +1,8 @@
+Testname: cruft-autogenerated-visual-cpp
+Sequence: 6000
+Version: 1.0
+Options: -I -E --pedantic
+Skeleton: pedantic
+Description: Check for autogenerated visual c++
+Test-For:
+ autogenerated-visual-c++-file
diff --git a/t/tests/cruft-autogenerated-visual-cpp/tags b/t/tests/cruft-autogenerated-visual-cpp/tags
new file mode 100644
index 0000000..400331a
--- /dev/null
+++ b/t/tests/cruft-autogenerated-visual-cpp/tags
@@ -0,0 +1 @@
+P: cruft-autogenerated-visual-cpp source: autogenerated-visual-c++-file src/positive.cpp

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


Reply to: