mirror of https://github.com/gogs/gogs.git
fix up golangci-lint
parent
0885eb8f1c
commit
5a60b89b92
|
@ -52,7 +52,7 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Run golangci-lint
|
- name: Run golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v4
|
uses: golangci/golangci-lint-action@v7
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: --timeout=30m
|
args: --timeout=30m
|
||||||
|
|
|
@ -1,29 +1,40 @@
|
||||||
linters-settings:
|
version: "2"
|
||||||
staticcheck:
|
linters:
|
||||||
checks: [
|
enable:
|
||||||
"all",
|
- nakedret
|
||||||
"-SA1019" # There are valid use cases of strings.Title
|
- rowserrcheck
|
||||||
]
|
- unconvert
|
||||||
nakedret:
|
- unparam
|
||||||
max-func-lines: 0 # Disallow any unnamed return statement
|
settings:
|
||||||
govet:
|
govet:
|
||||||
disable:
|
disable:
|
||||||
# printf: non-constant format string in call to fmt.Errorf (govet)
|
# printf: non-constant format string in call to fmt.Errorf (govet)
|
||||||
# showing up since golangci-lint version 1.60.1
|
# showing up since golangci-lint version 1.60.1
|
||||||
- printf
|
- printf
|
||||||
|
staticcheck:
|
||||||
linters:
|
checks:
|
||||||
|
- -SA1019 # There are valid use cases of strings.Title
|
||||||
|
- all
|
||||||
|
nakedret:
|
||||||
|
max-func-lines: 0 # Disallow any unnamed return statement
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- common-false-positives
|
||||||
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
formatters:
|
||||||
enable:
|
enable:
|
||||||
- unused
|
|
||||||
- errcheck
|
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- nakedret
|
|
||||||
- gofmt
|
- gofmt
|
||||||
- rowserrcheck
|
|
||||||
- unconvert
|
|
||||||
- goimports
|
- goimports
|
||||||
- unparam
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|
Loading…
Reference in New Issue