1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
#!/bin/sh
err()
{
echo "ERROR: $1" >&2
exit 1
}
[ "$(type shellcheck 2>/dev/null)" ] || err "shellcheck is not installed (apt-get install shellcheck)"
shellcheck -e SC2015,SC2039,SC1091,SC2154,SC1094,SC2143 ia ia.array ia.debug ia.interactive ia.log ia.check
# SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
# SC2039: In POSIX sh, 'local' is undefined.
# SC1091: Not following: /usr/share/shellia/ia.log was not specified as input (see shellcheck -x).
# SC2154: ia_prefix is referenced but not assigned.
# SC1094: Parsing of sourced file failed. Ignoring it.
# SC2143: Use grep -q instead of comparing output with [ -n .. ].
|