Bug#831864: lintian: Should warn about python packages which ship coverage information
Chris Lamb:
> tags 831864 + patch
> thanks
>
> Hi Lintian maintainers,
>
Hi,
Thanks for the patch! :)
Two minor remarks
> Attached is the following:
>
> commit 707a5c5965f4349735e185caaf18f7af022d279f
> Author: Chris Lamb <lamby@debian.org>
> Date: Wed Aug 24 19:12:16 2016 +0100
>
> c/files: Warn about Python packages which ship coverage.py information. (Closes: #831864)
>
> Signed-off-by: Chris Lamb <lamby@debian.org>
>
> 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/debian/debian/rules | 4 ++++
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The "d/rules" of the test seems to be redundant in the given case. If
the test does not need anything special from d/rules we have a standard
one (see t/templates/tests/{skel,pedantic}/debian/rules).
> t/tests/files-python-coverage/desc | 6 ++++++
> t/tests/files-python-coverage/tags | 1 +
> 7 files changed, 29 insertions(+)
>
>
> Regards,
>
"""
--- 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 ($fname =~ m,\.coverage$,o) {
+ 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;
"""
Should the regex have a "/" (or use $basename eq '.coverage'[1])?
AFAICT this would also match "foo.coverage" (which may be completely
unrelated to this problem).
Thanks,
~Niels
[1] I admit not remembering whether there is a $basename in scope in
that part of the check. :)
Reply to: