diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index b98ae8e..0039d63 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -16,4 +16,4 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: v1.53 - args: --timeout=5m + args: --timeout=5m --config=./.golangci.pipeline.yml diff --git a/.golangci.pipeline.yml b/.golangci.pipeline.yml new file mode 100644 index 0000000..281c9d4 --- /dev/null +++ b/.golangci.pipeline.yml @@ -0,0 +1,41 @@ +run: + concurrency: 8 + timeout: 5m + issues-exit-code: 1 + tests: true + +output: + formats: colored-line-number + print-issued-lines: true + print-linter-name: true + +linters-settings: + govet: + shadow: true + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 3 + +linters: + disable-all: true + enable: + - errcheck + - goconst + - goimports + - govet + - ineffassign + - gosimple + - staticcheck + - typecheck + - revive + - unused + +issues: + exclude-use-default: false + exclude: + - G104 + - exported func .* returns unexported type .*, which can be annoying to use + - should have a package comment + - don't use an underscore in package name