mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
tests: add "shellcheck" tests for "ksh" scripts
This commit is contained in:
parent
f08727035f
commit
6c0e154e07
2 changed files with 15 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
dist: trusty
|
||||
install:
|
||||
- sudo apt-get update
|
||||
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint
|
||||
- sudo apt-get --no-install-recommends install devscripts python python3 ruby php5-cli gawk ksh zsh pylint shellcheck
|
||||
- sudo apt-get --no-install-recommends install pkg-config libdb-dev libvirt-dev libexpat-dev
|
||||
# - Munin/Plugin.pm is in "munin-node" on precise
|
||||
- sudo apt-get --no-install-recommends install munin-node
|
||||
|
|
8
t/test.t
8
t/test.t
|
@ -85,12 +85,20 @@ sub process_file {
|
|||
};
|
||||
}
|
||||
elsif ( $interpreter =~ m{/bin/ksh} ) {
|
||||
subtest $filename => sub {
|
||||
plan tests => 2;
|
||||
run_check(
|
||||
{ command => [ 'ksh', '-n', $file ],
|
||||
description => 'ksh syntax check',
|
||||
filename => $filename
|
||||
}
|
||||
);
|
||||
run_check(
|
||||
{ command => [ 'shellcheck', $file ],
|
||||
description => 'shellcheck'
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
elsif ( $interpreter =~ m{bash} ) {
|
||||
run_check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue