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
38 debian/dpkg.cron.daily
42 src/dpkg-maintscript-helper.sh
45 my @shellcheck_opts = (
46 '--external-sources', # Allow checking external source files.
47 '--exclude=SC1090', # Allow non-constant source.
48 '--exclude=SC2039', # Allow local keyword.
49 '--exclude=SC2166', # Allow -a and -o.
50 '--exclude=SC2034', # Allow unused variables for colors.
51 '--exclude=SC3043', # Allow local keyword.
54 plan tests
=> scalar @files;
60 my $tags = qx(shellcheck
@shellcheck_opts $file 2>&1);
65 my $ok = length $tags == 0;
67 ok
($ok, 'shellcheck');
73 foreach my $file (@files) {
74 shell_syntax_ok
($file);