From e4dd2be156ed0b0f32deb8b1c844f191510cbdb3 Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Thu, 4 Apr 2019 20:49:15 -0700 Subject: [PATCH] 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 --- .github/assert-contributors.sh | 0 .github/lint-commit-message.sh | 0 .github/lint-disallowed-functions-in-library.sh | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .github/assert-contributors.sh mode change 100644 => 100755 .github/lint-commit-message.sh mode change 100644 => 100755 .github/lint-disallowed-functions-in-library.sh diff --git a/.github/assert-contributors.sh b/.github/assert-contributors.sh old mode 100644 new mode 100755 diff --git a/.github/lint-commit-message.sh b/.github/lint-commit-message.sh old mode 100644 new mode 100755 diff --git a/.github/lint-disallowed-functions-in-library.sh b/.github/lint-disallowed-functions-in-library.sh old mode 100644 new mode 100755 index f316c18..a967be0 --- a/.github/lint-disallowed-functions-in-library.sh +++ b/.github/lint-disallowed-functions-in-library.sh @@ -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[@]}"