Update CI configs to v0.4.24

Update lint scripts and CI configs.
This commit is contained in:
Pion
2021-04-20 23:04:48 +00:00
committed by Sean DuBois
parent eeb67e1c53
commit 7a71cc62d1

View File

@@ -19,7 +19,7 @@ then
fi
EXCLUDE_DIRECTORIES=${DISALLOWED_FUNCTIONS_EXCLUDED_DIRECTORIES:-"examples"}
DISALLOWED_FUNCTIONS=('os.Exit(' 'panic(' 'Fatal(' 'Fatalf(' 'Fatalln(' 'fmt.Println(' 'fmt.Printf(' 'log.Print(' 'log.Println(' 'log.Printf(')
DISALLOWED_FUNCTIONS=('os.Exit(' 'panic(' 'Fatal(' 'Fatalf(' 'Fatalln(' 'fmt.Println(' 'fmt.Printf(' 'log.Print(' 'log.Println(' 'log.Printf(' 'print(' 'println(')
files=$(
find "$SCRIPT_PATH/.." -name "*.go" \
@@ -41,7 +41,7 @@ files=$(
for disallowedFunction in "${DISALLOWED_FUNCTIONS[@]}"
do
if grep -e "$disallowedFunction" $files | grep -v -e 'nolint'; then
if grep -e "\s$disallowedFunction" $files | grep -v -e 'nolint'; then
echo "$disallowedFunction may only be used in example code"
exit 1
fi