This is an automated email from the git hooks/post-receive script. lamby pushed a commit to branch warn-about-dotcoverage-files-831864 in repository lintian.
commit 55d0eee57b107bd595913f737d8857677913cea6 Author: Chris Lamb <[email protected]> Date: Tue Sep 6 22:36:54 2016 +0100 c/files: Warn about Python packages which ship coverage.py information. (Closes: #831864) Signed-off-by: Chris Lamb <[email protected]> --- checks/files.desc | 12 ++++++++++++ checks/files.pm | 5 +++++ t/tests/files-python-coverage/debian/.coverage | 0 t/tests/files-python-coverage/debian/debian/install | 1 + t/tests/files-python-coverage/desc | 6 ++++++ t/tests/files-python-coverage/tags | 1 + 6 files changed, 25 insertions(+) diff --git a/checks/files.desc b/checks/files.desc index 5ddc26b..1400a5c 100644 --- a/checks/files.desc +++ b/checks/files.desc @@ -846,6 +846,18 @@ Info: Python eggs should not be installed, since the Debian package is . The egg may contain pre-compiled Python bytecode or shared libraries. +Tag: package-contains-python-coverage-file +Severity: normal +Certainty: certain +Info: The package conains a file that looks like output from the Python + coverage.py tool. These are generated by python{,3}-coverage during a test + run, noting which parts of the code have been executed. They can then be + subsequently analyzed to identify code that could have been executed but was + not. + . + As they are are unlikely to be of utility to end-users, these files should be + removed from the package. + Tag: package-installs-python-pycache-dir Severity: serious Certainty: certain diff --git a/checks/files.pm b/checks/files.pm index b546cf9..f4f7579 100644 --- a/checks/files.pm +++ b/checks/files.pm @@ -1102,6 +1102,11 @@ sub run { tag 'package-installs-python-egg', $file; } + # ---------------- .coverage (coverage.py output) + if ($file->basename eq ".coverage") { + tag 'package-contains-python-coverage-file', $file; + } + # ---------------- /usr/lib/site-python if ($fname =~ m,^usr/lib/site-python/\S,) { tag 'file-in-usr-lib-site-python', $file; diff --git a/t/tests/files-python-coverage/debian/.coverage b/t/tests/files-python-coverage/debian/.coverage new file mode 100644 index 0000000..e69de29 diff --git a/t/tests/files-python-coverage/debian/debian/install b/t/tests/files-python-coverage/debian/debian/install new file mode 100644 index 0000000..3b6a0bc --- /dev/null +++ b/t/tests/files-python-coverage/debian/debian/install @@ -0,0 +1 @@ +.coverage /usr/share/files-python-coverage diff --git a/t/tests/files-python-coverage/desc b/t/tests/files-python-coverage/desc new file mode 100644 index 0000000..67126e6 --- /dev/null +++ b/t/tests/files-python-coverage/desc @@ -0,0 +1,6 @@ +Testname: files-python-coverage +Sequence: 6000 +Version: 1.0 +Description: Check for Python .coverage files +Test-For: + package-contains-python-coverage-file diff --git a/t/tests/files-python-coverage/tags b/t/tests/files-python-coverage/tags new file mode 100644 index 0000000..c943f51 --- /dev/null +++ b/t/tests/files-python-coverage/tags @@ -0,0 +1 @@ +W: files-python-coverage: package-contains-python-coverage-file usr/share/files-python-coverage/.coverage -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git

