3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <https://www.gnu.org/licenses/>.
20 use Test
::Dpkg
qw(:needs);
23 test_needs_command
('shellcheck');
24 test_needs_srcdir_switch
();
27 dselect/methods/disk/install.sh
28 dselect/methods/disk/setup.sh
29 dselect/methods/disk/update.sh
30 dselect/methods/media/install.sh
31 dselect/methods/media/setup.sh
32 dselect/methods/media/update.sh
40 debian/dpkg.cron.daily
44 src/dpkg-maintscript-helper.sh
46 my @shellcheck_opts = (
47 '--external-sources', # Allow checking external source files.
48 '--exclude=SC1090', # Allow non-constant source.
49 '--exclude=SC2039', # Allow local keyword.
50 '--exclude=SC2166', # Allow -a and -o.
51 '--exclude=SC2034', # Allow unused variables for colors.
52 '--exclude=SC3043', # Allow local keyword.
55 plan tests
=> scalar @files;
61 my $tags = qx(shellcheck
@shellcheck_opts $file 2>&1);
66 my $ok = length $tags == 0;
68 ok
($ok, 'shellcheck');
74 foreach my $file (@files) {
75 shell_syntax_ok
($file);