Update CI configs to v0.10.7

Update lint scripts and CI configs.
This commit is contained in:
Pion
2023-04-18 10:38:58 +00:00
committed by Sean DuBois
parent 9f74821356
commit efffef2957
16 changed files with 82 additions and 2 deletions

3
.github/.gitignore vendored
View File

@@ -1 +1,4 @@
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
.goassets .goassets

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
set -eu set -eu

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
SCRIPT_PATH="$(realpath "$(dirname "$0")")" SCRIPT_PATH="$(realpath "$(dirname "$0")")"

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: CodeQL name: CodeQL

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Generate Authors name: Generate Authors

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Lint name: Lint
on: on:

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Release name: Release
on: on:

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Fix go.sum name: Fix go.sum
on: on:

22
.github/workflows/reuse.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
#
# DO NOT EDIT THIS FILE
#
# It is automatically copied from https://github.com/pion/.goassets repository.
# If this repository should have package specific CI config,
# remove the repository name from .goassets/.github/workflows/assets-sync.yml.
#
# If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository.
#
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: REUSE Compliance Check
on:
push:
pull_request:
jobs:
lint:
uses: pion/.goassets/.github/workflows/reuse.reusable.yml@master

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Test name: Test
on: on:

View File

@@ -8,6 +8,8 @@
# If you want to update the shared CI config, send a PR to # If you want to update the shared CI config, send a PR to
# https://github.com/pion/.goassets instead of this repository. # https://github.com/pion/.goassets instead of this repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
name: Go mod tidy name: Go mod tidy
on: on:

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
### JetBrains IDE ### ### JetBrains IDE ###
##################### #####################
.idea/ .idea/

View File

@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
linters-settings: linters-settings:
govet: govet:
check-shadowing: true check-shadowing: true
@@ -11,6 +14,14 @@ linters-settings:
- github.com/pkg/errors: - github.com/pkg/errors:
recommendations: recommendations:
- errors - errors
forbidigo:
forbid:
- Fatal(f|ln)?$
- ^fmt.Print(f|ln)?$
- ^log.Print(f|ln)?$
- ^os.Exit$
- ^panic$
- ^print(ln)?$
linters: linters:
enable: enable:
@@ -29,6 +40,7 @@ linters:
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
- exhaustive # check exhaustiveness of enum switch statements - exhaustive # check exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables - exportloopref # checks for pointers to enclosing loop variables
- forbidigo # Forbids identifiers
- forcetypeassert # finds forced type assertions - forcetypeassert # finds forced type assertions
- gci # Gci control golang package import order and make it always deterministic. - gci # Gci control golang package import order and make it always deterministic.
- gochecknoglobals # Checks that no globals are present in Go code - gochecknoglobals # Checks that no globals are present in Go code
@@ -73,7 +85,6 @@ linters:
- containedctx # containedctx is a linter that detects struct contained context.Context field - containedctx # containedctx is a linter that detects struct contained context.Context field
- cyclop # checks function and package cyclomatic complexity - cyclop # checks function and package cyclomatic complexity
- exhaustivestruct # Checks if all struct's fields are initialized - exhaustivestruct # Checks if all struct's fields are initialized
- forbidigo # Forbids identifiers
- funlen # Tool for detection of long functions - funlen # Tool for detection of long functions
- gocyclo # Computes and checks the cyclomatic complexity of functions - gocyclo # Computes and checks the cyclomatic complexity of functions
- godot # Check if comments end in a period - godot # Check if comments end in a period
@@ -105,6 +116,7 @@ issues:
- path: _test\.go - path: _test\.go
linters: linters:
- gocognit - gocognit
- forbidigo
# Allow complex main function in examples # Allow complex main function in examples
- path: examples - path: examples
@@ -112,5 +124,15 @@ issues:
linters: linters:
- gocognit - gocognit
# Allow forbidden identifiers in examples
- path: examples
linters:
- forbidigo
# Allow forbidden identifiers in CLI commands
- path: cmd
linters:
- forbidigo
run: run:
skip-dirs-use-default: false skip-dirs-use-default: false

View File

@@ -1,2 +1,5 @@
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
builds: builds:
- skip: true - skip: true

7
.reuse/dep5 Normal file
View File

@@ -0,0 +1,7 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Pion
Source: https://github.com/pion/
Files: README.md AUTHORS.txt renovate.json
Copyright: 2023 The Pion community <https://pion.ly>
License: MIT

View File

@@ -3,6 +3,8 @@
# #
# It is automatically copied from https://github.com/pion/.goassets repository. # It is automatically copied from https://github.com/pion/.goassets repository.
# #
# SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
# SPDX-License-Identifier: MIT
coverage: coverage:
status: status: