check_code.sh 459 Bytes
Newer Older
Vitaly Lipatov's avatar
Vitaly Lipatov committed
1 2 3 4 5
#!/bin/sh

# http://mywiki.wooledge.org/Bashism
# https://wiki.ubuntu.com/DashAsBinSh

6 7
EXCL=-eSC2086,SC2039,SC2034,SC2068,SC2155

8 9 10 11 12
# TODO:
# SC2154: pkg_filenames is referenced but not assigned.
# SC2002: Useless cat.
EXCL="$EXCL,SC2154,SC2002"

13 14
if [ -n "$1" ] ; then
    shellcheck $EXCL "$1"
Vitaly Lipatov's avatar
Vitaly Lipatov committed
15
    checkbashisms -f "$1"
16 17 18
    exit
fi

Vitaly Lipatov's avatar
Vitaly Lipatov committed
19
checkbashisms -f bin/*
Vitaly Lipatov's avatar
Vitaly Lipatov committed
20
checkbashisms -f Makefile
21 22

shellcheck $EXCL \
23
	bin/epm bin/distro_info bin/epm-* bin/serv-* bin/tools_*