Package: libperl-critic-perl Version: 1.126-1 Severity: normal File: /usr/bin/perlcritic Control: affects -1 check-all-the-things User: [email protected] Usertags: file-overwrite
There is some code which causes perlcritic to create or overwrite a perltidy.ERR file in the current directory. perlcritic and perltidy are static analysis tools so they should not write to files in the current directory. I expect the fix for this is to pass a temporary filename to perltidy or get it to use stdout instead of a file. pabs@chianamo ~ $ mkdir tmp-pc pabs@chianamo ~ $ cd tmp-pc pabs@chianamo ~/tmp-pc $ mkdir tmp pabs@chianamo ~/tmp-pc $ cat > tmp/foo.pl <<"EOF" > $foo = 'bar' > $bar = 'baz'; > EOF pabs@chianamo ~/tmp-pc $ find . ./tmp ./tmp/foo.pl pabs@chianamo ~/tmp-pc $ cat tmp/foo.pl $foo = 'bar' $bar = 'baz'; pabs@chianamo ~/tmp-pc $ perlcritic -1 . perltidy had errors!! at line 1, column 1. See page 33 of PBP. (Severity: 1) Module does not end with "1;" at line 1, column 1. Must end with a recognizable true value. (Severity: 4) Code not contained in explicit package at line 1, column 1. Violates encapsulation. (Severity: 4) No package-scoped "$VERSION" variable found at line 1, column 1. See page 404 of PBP. (Severity: 2) Code before strictures are enabled at line 1, column 1. See page 429 of PBP. (Severity: 5) Code before warnings are enabled at line 1, column 1. See page 431 of PBP. (Severity: 4) pabs@chianamo ~/tmp-pc $ find . ./perltidy.ERR ./tmp ./tmp/foo.pl pabs@chianamo ~/tmp-pc $ cat perltidy.ERR 2: $bar = 'baz'; ^ found Scalar where operator expected Missing ';' above? pabs@chianamo ~/tmp-pc $ echo foo > perltidy.ERR pabs@chianamo ~/tmp-pc $ cat perltidy.ERR foo pabs@chianamo ~/tmp-pc $ perlcritic -1 . perltidy had errors!! at line 1, column 1. See page 33 of PBP. (Severity: 1) Module does not end with "1;" at line 1, column 1. Must end with a recognizable true value. (Severity: 4) Code not contained in explicit package at line 1, column 1. Violates encapsulation. (Severity: 4) No package-scoped "$VERSION" variable found at line 1, column 1. See page 404 of PBP. (Severity: 2) Code before strictures are enabled at line 1, column 1. See page 429 of PBP. (Severity: 5) Code before warnings are enabled at line 1, column 1. See page 431 of PBP. (Severity: 4) pabs@chianamo ~/tmp-pc $ cat perltidy.ERR 2: $bar = 'baz'; ^ found Scalar where operator expected Missing ';' above? -- System Information: Debian Release: stretch/sid APT prefers testing-debug APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages libperl-critic-perl depends on: ii libb-keywords-perl 1.15-1 ii libconfig-tiny-perl 2.23-1 ii libemail-address-perl 1.908-1 ii libexception-class-perl 1.40-1 ii libfile-homedir-perl 1.00-1 ii libfile-which-perl 1.21-1 ii libio-string-perl 1.08-3 ii liblist-moreutils-perl 0.416-1 ii libmodule-pluggable-perl 5.2-1 ii libpod-spell-perl 1.20-1 ii libppi-perl 1.220-1 ii libppix-regexp-perl 0.050-1 ii libppix-utilities-perl 1.001000-2 ii libreadonly-perl 2.050-1 ii libstring-format-perl 1.17-1 ii libtask-weaken-perl 1.04-1 ii perl 5.22.2-3 ii perltidy 20140328-1 libperl-critic-perl recommends no packages. libperl-critic-perl suggests no packages. -- no debconf information -- bye, pabs https://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part

