Update assets to v0.0.2

Update lint scripts and CI configs.
This commit is contained in:
Pion
2020-01-10 16:40:57 +09:00
committed by Atsushi Watanabe
parent 442c324a51
commit 961bcb4e7e
9 changed files with 112 additions and 2 deletions
+8 -1
View File
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
set -e
# Unshallow the repo, this check doesn't work with this enabled
@@ -9,7 +16,7 @@ fi
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
EXCLUDED_CONTIBUTORS=('John R. Bradley' 'renovate[bot]' 'Renovate Bot')
EXCLUDED_CONTIBUTORS=('John R. Bradley' 'renovate[bot]' 'Renovate Bot' 'Pion Bot')
MISSING_CONTIBUTORS=()
shouldBeIncluded () {
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
set -e
.github/lint-commit-message.sh $1
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
# Redirect output to stderr.
exec 1>&2
.github/lint-disallowed-functions-in-library.sh
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
set -e
.github/assert-contributors.sh
exit 0
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cp "$SCRIPT_PATH/hooks/commit-msg.sh" "$SCRIPT_PATH/../.git/hooks/commit-msg"
cp "$SCRIPT_PATH/hooks/pre-commit.sh" "$SCRIPT_PATH/../.git/hooks/pre-commit"
cp "$SCRIPT_PATH/hooks/pre-push.sh" "$SCRIPT_PATH/../.git/hooks/pre-push"
+7
View File
@@ -1,4 +1,11 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
set -e
display_commit_message_error() {
@@ -1,9 +1,16 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
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=e2e --exclude-dir=.git --exclude-dir=.github "
EXCLUDE_DIRECTORIES="--exclude-dir=examples --exclude-dir=.git --exclude-dir=.github "
DISALLOWED_FUNCTIONS=('os.Exit(' 'panic(' 'Fatal(' 'Fatalf(' 'Fatalln(' 'fmt.Println(' 'fmt.Printf(' 'log.Print(' 'log.Println(' 'log.Printf(')
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
set -e
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
GO_REGEX="^[a-zA-Z_]+\.go$"
find "$SCRIPT_PATH/.." -name "*.go" | while read fullpath; do
filename=$(basename -- "$fullpath")
if ! [[ $filename =~ $GO_REGEX ]]; then
echo "$filename is not a valid filename for Go code, only alpha and underscores are supported"
exit 1
fi
done
+19
View File
@@ -0,0 +1,19 @@
#
# DO NOT EDIT THIS FILE DIRECTLY
#
# It is automatically copied from https://github.com/pion/.goassets repository.
#
coverage:
status:
project:
default:
# Allow decreasing 2% of total coverage to avoid noise.
threshold: 2%
patch:
default:
target: 70%
ignore:
- "examples/*"
- "examples/**/*"