-
Notifications
You must be signed in to change notification settings - Fork 22
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
1 parent
199b7d3
commit aa5ea5b
Showing
3 changed files
with
109 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: {} | ||
jobs: | ||
golangci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
check-latest: true | ||
- uses: actions/checkout@v4 | ||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest |
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
run: | ||
go: '1.21' | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- bodyclose | ||
- containedctx | ||
- contextcheck | ||
- cyclop | ||
- deadcode # replaced with unused | ||
- depguard # too annoying | ||
- dupl | ||
- dupword | ||
- errcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
- exhaustivestruct # Replaced by exhaustruct. | ||
- exhaustruct | ||
- exhaustive # too annoying, too hard to disable with comments | ||
- forbidigo | ||
- funlen | ||
- gci | ||
- gochecknoglobals | ||
- gocognit | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- godot | ||
- godox | ||
- goerr113 | ||
- gofumpt | ||
- golint # Replaced by revive. | ||
- gomnd | ||
- ifshort | ||
- inamedparam # too opinionated | ||
- interfacer # deprecated | ||
- ireturn | ||
- lll | ||
- maintidx | ||
- maligned # Replaced by govet | ||
- musttag # flaky, fires on structs which aren't JSON marshalled | ||
- nlreturn | ||
- noctx | ||
- nonamedreturns | ||
- nosnakecase | ||
- paralleltest | ||
- prealloc | ||
- rowserrcheck # disabled because of generics https://github.com/golangci/golangci-lint/issues/2649. | ||
- scopelint # Replaced by exportloopref. | ||
- sqlclosecheck # disabled because of generics https://github.com/golangci/golangci-lint/issues/2649. | ||
- structcheck # replaced with unused | ||
- tagliatelle | ||
- tagalign # too fussy | ||
- testpackage # too annoying | ||
- thelper | ||
- usestdlibvars | ||
- varcheck # Replaced by unused. | ||
- varnamelen | ||
- wastedassign # disabled because of generics | ||
- whitespace | ||
- wrapcheck | ||
- wsl | ||
|
||
linters-settings: | ||
gofumpt: | ||
module-path: github.com/pkg/json | ||
gosec: | ||
excludes: | ||
- G112 # Potential slowloris attack | ||
- G114 # Use of net/http serve function that has no support for setting timeouts | ||
- G404 # Insecure random number source (rand) | ||
revive: | ||
rules: | ||
- name: var-naming | ||
disabled: true | ||
stylecheck: | ||
checks: [ | ||
"all", | ||
"-ST1003", | ||
"-ST1012" | ||
] | ||
unparam: | ||
check-exported: false | ||
usestdlibvars: | ||
http-method: false | ||
http-status-code: false | ||
|
||
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 |