mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Update CI configs to v0.4.24
Update lint scripts and CI configs.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user