-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
950 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ | |
exec 1>&2 | ||
|
||
.github/lint-disallowed-functions-in-library.sh | ||
.github/lint-no-trailing-newline-in-log-messages.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# DO NOT EDIT THIS FILE | ||
# | ||
# It is automatically copied from https://github.com/pion/.goassets repository. | ||
# | ||
# If you want to update the shared CI config, send a PR to | ||
# https://github.com/pion/.goassets instead of this 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 ) | ||
if [ -f ${SCRIPT_PATH}/.ci.conf ] | ||
then | ||
. ${SCRIPT_PATH}/.ci.conf | ||
fi | ||
|
||
files=$( | ||
find "$SCRIPT_PATH/.." -name "*.go" \ | ||
| while read file | ||
do | ||
excluded=false | ||
for ex in $EXCLUDE_DIRECTORIES | ||
do | ||
if [[ $file == */$ex/* ]] | ||
then | ||
excluded=true | ||
break | ||
fi | ||
done | ||
$excluded || echo "$file" | ||
done | ||
) | ||
|
||
if grep -E '\.(Trace|Debug|Info|Warn|Error)f?\("[^"]*\\n"\)?' $files | grep -v -e 'nolint'; then | ||
echo "Log format strings should have trailing new-line" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '23 5 * * 0' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- '**.go' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
# The code in examples/ might intentionally do things like log credentials | ||
# in order to show how the library is used, aid in debugging etc. We | ||
# should ignore those for CodeQL scanning, and only focus on the package | ||
# itself. | ||
- name: Remove example code | ||
run: | | ||
rm -rf examples/ | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: 'go' | ||
|
||
- name: CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ cover.out | |
*.wasm | ||
examples/sfu-ws/cert.pem | ||
examples/sfu-ws/key.pem | ||
wasm_exec.js |
Oops, something went wrong.