debian-cis/shellcheck/launch_shellcheck.sh
Charles Herlin 176fb96fa4 FEAT: automate shellcheck test with docker
IMP: search for all .sh files to shellcheck
If no file is passed as argument, shellchek will be run on all
.sh files

Fix dockerfile location and expand full shellcheck options
2019-01-17 12:39:15 +01:00

16 lines
265 B
Bash
Executable File

#!/bin/bash
files=""
if [ $# -eq 0 ]; then
files=$(find . -name "*.sh")
else
files="$*"
fi
for f in $files; do
printf "\e[1;36mRunning shellcheck on: %s \e[0m\n" "$f"
/usr/bin/shellcheck --color=always --external-sources --shell=bash "$f"
done