Your message dated Sat, 25 Jun 2016 16:52:21 +0000
with message-id <[email protected]>
and subject line Bug#791722: fixed in check-all-the-things 2016.06.25
has caused the Debian Bug report #791722,
regarding add support for matching files based on MIME types
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
791722: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791722
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: check-all-the-things
Version: 2015.12.10
Severity: normal
Tags: patch

Hello,

currently, checkbashisms and shellcheck only look for files ending in '.sh'.
However, there are people who believe that executables should not be named
after the language in which they're currently implemented. For example, there
is "check-all-the-things" but not "check-all-the-things.py". Personally, I
advocate this, but for this report it only matters that a significant portion
of scripts does not end in '.sh'.

Using the existing syntax of catt, it's rather easy to extend the checks, and
filter by "file | grep | cat". Please see below for example runs on some
project I'm working on.

Impact:
- positive->negative can only occur for files whose name end in '.sh' but are
not shell scripts. I consider this a good thing, but I'm not sure why this
would ever happen.
- negative->positive can only occur for files whose name does NOT end in '.sh',
but ARE shell scripts, and DO trigger warnings/errors in the linting tools.
That's the point of this patch, so it's a good thing, too.

Is there a linter for the checks?
Should I adapt other checks, too?
In how far does this affect #791722, which seems to revolve mostly around
python scripts?

Cheers,
Ben Wiederhake



user@machine:~/workspace/telegram-purple$ # Run installed, non-patched version
on some project
user@machine:~/workspace/telegram-purple$ check-all-the-things --checks
=checkbashisms --checks +shellcheck
Skipped and hidden checks:
- cmdline disabled check: 7z-test acheck ansible-lint appstream-util-validate
appstreamcli-validate bashate bfbtester ...
- dangerous check: bfbtester perl-b-lint perl-syntax-check
- help needed: acheck ansible-lint appstream-util-validate appstreamcli-
validate build-log-scanner cbmc chk-origtargz ...
- no matching files: 7z-test bfbtester blhc build-log-errors build-log-warnings
bzip2-test cabal chk-origtargz ...
- no output: checkbashisms shellcheck



user@machine:~/workspace/telegram-purple$ # Run local, patched version on some
project
user@machine:~/workspace/telegram-purple$ ../check-all-the-things/check-all-
the-things --checks =checkbashisms --checks +shellcheck
$ find \( -name .git -o -name .svn -o -name .bzr -o -name CVS -o -name .hg -o
-name _darcs -o -name _FOSSIL_ -o -name .sgdrawer -o -name configure -o -name
config.status -o -name config.sub -o -name config.guess -o -name install-sh -o
-name install.sh \) -prune -o -type f -print0 | xargs -0 file -F "   " -N |
grep -a 'shell script' | cut -f 1 | xargs -d"\n" --no-run-if-empty
checkbashisms
possible bashism in ./commit.h.gen line 23 ('command' with option other than
-p):
if ! (command -v git && git status) >/dev/null 2>&1

$ find \( -name .git -o -name .svn -o -name .bzr -o -name CVS -o -name .hg -o
-name _darcs -o -name _FOSSIL_ -o -name .sgdrawer -o -name configure -o -name
config.status -o -name config.sub -o -name config.guess -o -name install-sh -o
-name install.sh \) -prune -o -type f -print0 | xargs -0 file -F "   " -N |
grep -a 'shell script' | cut -f 1 | xargs -d"\n" --no-run-if-empty shellcheck

In ./commit.h.gen line 35:
GIT_COMMIT=`git rev-parse HEAD | cut -c1-10`
           ^-- SC2006: Use $(..) instead of legacy `..`.

In ./gen-origtar line 47:
TARNAME="telegram-purple_`git describe --tags | sed s/^v// `.orig.tar.gz"
                         ^-- SC2006: Use $(..) instead of legacy `..`.

In ./gen-origtar line 49:
echo mv -f bin/result.tar.gz $TARNAME
                             ^-- SC2086: Double quote to prevent globbing and
word splitting.

In ./gen-origtar line 50:
mv -f bin/result.tar.gz $TARNAME
                        ^-- SC2086: Double quote to prevent globbing and word
splitting.

Skipped and hidden checks:
- cmdline disabled check: 7z-test acheck afl ansible-lint appstream-util-
validate appstreamcli-validate autodep8 bashate ...
- dangerous check: bfbtester perl-b-lint perl-syntax-check
- help needed: acheck ansible-lint cbmc checkmp3 chk-origtargz clang-check
clang-tidy cppclean doc8 embedding-restrictions ...
- no matching files: 7z-test acheck afl ansible-lint appstream-util-validate
appstreamcli-validate autodep8 bashate ...
>From 7f782a324333fce427d2369b7ec96ae99f61f8c5 Mon Sep 17 00:00:00 2001
From: Ben Wiederhake <[email protected]>
Date: Thu, 10 Mar 2016 12:11:54 +0100
Subject: [PATCH] Improve detection of shell scripts

Affects [checkbashisms] and [shellcheck]
---
 data/sh | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/data/sh b/data/sh
index 2389117..32469e6 100644
--- a/data/sh
+++ b/data/sh
@@ -4,13 +4,23 @@ command = sh -n {file}
 
 [checkbashisms]
 apt = devscripts
-files = *.sh
-command = checkbashisms {files}
+# TODO: replace not-dirs with --ignore option
+not-dirs = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer
+# TODO: replace not-files with recursive option (#780197)
+not-files =
+ configure config.status config.sub config.guess install-sh install.sh
+# Careful: file -F "<LITERAL_TAB>" ... cut -d "<LITERAL_TAB>"
+command = file -F "	" -N {files} | grep -a 'shell script' | cut -f 1 -d "	" | xargs -d"\n" --no-run-if-empty checkbashisms
 
 [shellcheck]
 apt = shellcheck
-files = *.sh *.bash *.zsh
-command = shellcheck {files}
+# TODO: replace not-dirs with --ignore option
+not-dirs = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer
+# TODO: replace not-files with recursive option (#780197)
+not-files =
+ configure config.status config.sub config.guess install-sh install.sh
+# Careful: file -F "<LITERAL_TAB>" ... cut -d "<LITERAL_TAB>"
+command = file -F "	" -N {files} | grep -a 'shell script' | cut -f 1 -d "	" | xargs -d"\n" --no-run-if-empty shellcheck
 
 [bashate]
 apt = python3-bashate | python-bashate
-- 
2.7.0


--- End Message ---
--- Begin Message ---
Source: check-all-the-things
Source-Version: 2016.06.25

We believe that the bug you reported is fixed in the latest version of
check-all-the-things, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Paul Wise <[email protected]> (supplier of updated check-all-the-things package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 25 Jun 2016 12:08:10 +0200
Source: check-all-the-things
Binary: check-all-the-things
Architecture: source
Version: 2016.06.25
Distribution: experimental
Urgency: medium
Maintainer: Paul Wise <[email protected]>
Changed-By: Paul Wise <[email protected]>
Description:
 check-all-the-things - check all of the things!
Closes: 791722
Changes:
 check-all-the-things (2016.06.25) experimental; urgency=medium
 .
   * New release.
     - The "Check A Bunch Of Things" release
     - The official abbreviation is now cats. Meow!
     - Bump Standards-Version, no changes needed
     - Use https for Vcs-Git and other URLs
     - Warn away the busy, lazy or noise intolerant
     - Drop the separation between groups/flags
     - Drop todo item deps down to Suggests
     - Fix file matching in a number of cases
     - Add argument completion for bash
     - Add an indicator of the currently running command
     - Add (slow) support for matching files based on MIME type (Closes: 
#791722)
     - Add better advice for style/complexity/other checks
     - Disable network checks when there is no default gateway
     - Trim check output to 10 lines by default
     - Support overlays for older distros
     - Add 'modify' flag for commands that modify files and
       thus should not be run by default
     - Add 'manual' flag for commands that must be manually run
     - Handle 'todo' flagged checks properly
     - Show list of found file extentions that were not checked
     - Rename final section to 'Remarks' since the name grew long
     - Give an error when choosing unknown checks/flags
     - Report when help is needed for some existing checks
     - Match more ZIP-based files for the unzip-test check
     - Document the use of usertags for this package
     - Document places where more check tools can be found
     - Add appstreamcli validate - check AppStream files
     - Add appstream-util validate - check AppStream files
     - Add bls-standalone - check build logs for issues
     - Add build-log-static-library - warn against static linking
     - Add complexity - check C code for function complexity
     - Add kwstyle - check C code for style conformance
     - Add opencolladavalidator - check COLLADA files
     - Add csslint-0.6 - check CSS files
     - Add wrap-and-sort - wrap and sort various debian/ files
     - Add license-reconcile - check debian/copyright files
     - Add debmake-k - check debian/copyright files
     - Add autodep8 - check if DEP-8 tests can be created
     - Add lockdep - check pthread-using programs
     - Add zzuf - fuzz program input
     - Add afl - intelligently fuzz program input
     - Add hardening-check - check programs for hardening
     - Add spellintian - check spelling using lintian dictionaries
     - Add flightcrew - check epub e-book files
     - Add erlang-shell-inject - check for Erlang shell metachar injection
     - Add erl-tidy - check Erlang code
     - Add font-embedding-restrictions - check TTF embedding restrictions
     - Add two jsonlints - check JSON files
     - Add autoupdate - update autotools files
     - Add autoscan - check completeness of configure.ac
     - Add timeless - check for macros that break reproducible builds
     - Add http - check for http URLs to switch to https
     - Add embed checks - heuristics for embedded code copies
     - Add mailto - check mailto: links
     - Add ocaml-shell-injection - check for OCaml shell metachar injection
     - Add pylint - check Python code for various issues
     - Add rpmlint - check RPM files
     - Add web-to-shell - check for `curl | sudo sh` antipattern
     - Add ssl-cert-check - check SSL key/cert files
     - Add yamllint - check YAML files
     - TODO items for android-lint smatch rzip-test lrzip-test
       csslint scan-copyrights licensecheck2dep5 debian-tracker
       erlang-elvis opentype-sanitiser bugpicker nit librejs-cli
       jpegoptim lisp-critic project-flint scheck ocaml-unsafe
       ocaml-mascot cpants-lint php7cc pngcrush optipng advpng
       mypy pycodestyle pydocstyle python3-requirements-detector
       pydiatra pytype ruby-reek ruby-sadist ruby-derailer
       ruby-space swiftlint x509lint certlint
Checksums-Sha1:
 c46aebf40b3617281792c8c1830e4079adffcdcb 1677 
check-all-the-things_2016.06.25.dsc
 0def58c26ef2d315afcd4dad8d13216a90ae0e39 26844 
check-all-the-things_2016.06.25.tar.xz
Checksums-Sha256:
 e6e55e23506eeb730d2b05353a1427c033e8f767715ae2afc52e7284ee0822ab 1677 
check-all-the-things_2016.06.25.dsc
 c29af9b5055f81c5c7bb04074a6094637359a7eb55ab7cb8e69853b4b8316027 26844 
check-all-the-things_2016.06.25.tar.xz
Files:
 372cfc883732acf0c3dc61d6d8397b90 1677 devel optional 
check-all-the-things_2016.06.25.dsc
 7342b7e2788133207fcf05b4dac6f554 26844 devel optional 
check-all-the-things_2016.06.25.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXbpaHAAoJEDEWul6f+mmj4TYP/0tQYIzKquY6AvCYS6tFiJEY
TyKt00hLb4Y6uGRXc/RU4wltf8agUqSABWLTZy7pn4ZcdXKFSOxib5lZUQohqRI2
mGIduZpa3HJOm/AdHwwLhjoUmfFvTDa/I1Kxz+5Hzqc7E0XRxDAZ1PaU0tMb9oq2
CY/fHpmjrMKkL+DJMPuzhtSTZsMsZeW8ToktOoxbIkwZYmWOJzU1pbuk4K76FFdi
iXKME34FXaLOcOGwj9Yo1eXP+NC3RDs9og4Llpae1n3ySRbRWx4ITm/rMOFIE8DQ
HtA0O+OffPmY0rDT1nZmcSujW5NsMDnL8w6aYHFovFcuZP+5un+MNSi9wre1zobs
7VGujLVV+yUzg9uZDjjSz7BQL42bVcy8DbWy345nR0xusJvjrtYhLV4UMxsjdhBu
BIZCvit3LJW9t8nA2zdXifPh9/G3i26qKz4sa3pLCCcBWHidl3A43ckZIzCGdKRc
Y2m8Dp8K4STfvgRYaXObtuHHzlGGv7UOPpfErEgYAEPokTyajRvinIQZIQ5XNr1f
+3Bf/rjOQSBFZznCJNB8ss0t9W/b39W83Ir30YIUevoCAvUx41u5WggpJ6FOow0o
XOP9mQtGBp44U3vgVaDgiJqMOF+SteEBevx1Zgjyk+1VSgryPBcZ1YcF5pRutfR+
8sXMyzrDV+jnikBtKon5
=R+lv
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to