Disallow stdlib functions that print to stdio

All printing to stdio must be done via pion/logging,
all calls to common printing functions will not cause CI
to fail

Relates to pion/webrtc#361
This commit is contained in:
Sean DuBois
2019-04-05 13:28:00 -07:00
parent af1bcf662b
commit e4dd2be156
3 changed files with 1 additions and 1 deletions
Regular → Executable
View File
Regular → Executable
View File
+1 -1
View File
@@ -4,7 +4,7 @@ set -e
# Disallow usages of functions that cause the program to exit in the library code
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
EXCLUDE_DIRECTORIES="--exclude-dir=examples --exclude-dir=.git --exclude-dir=.github "
DISALLOWED_FUNCTIONS=('os.Exit(' 'panic(' 'Fatal(' 'Fatalf(' 'Fatalln(')
DISALLOWED_FUNCTIONS=('os.Exit(' 'panic(' 'Fatal(' 'Fatalf(' 'Fatalln(' 'fmt.Println(' 'fmt.Printf(' 'log.Print(' 'log.Println(' 'log.Printf(')
for disallowedFunction in "${DISALLOWED_FUNCTIONS[@]}"