chore: sync golangci-lint

main
sudo pacman -Syu 2023-06-29 10:46:34 +07:00
parent d829a4e79d
commit eb994a0c95
2 changed files with 14 additions and 5 deletions

View File

@ -1,16 +1,14 @@
run:
timeout: 2m
timeout: 5m
tests: false
skip-dirs:
- ".*test.*"
- ".*mock.*"
- ".*generated.*"
- ".*example.*"
- ".*utils.*"
skip-files:
- ".*Mock.*"
- ".*_mock.*"
- ".*_generated.*"
output:
sort-results: true
@ -35,11 +33,11 @@ linters:
- gocritic
- goerr113
- gofumpt
- gomodguard
- gosec
- importas
- makezero
- nilnil
- noctx
- prealloc
- reassign
# - rowserrcheck
@ -69,16 +67,26 @@ linters-settings:
- unmarshal
- unreachable
- unusedresult
staticcheck:
checks: ["all", "-SA1019"]
# Custom
gocritic:
disabled-checks:
- ifElseChain
- singleCaseSwitch
- unnamedResult
- whyNoLint
enabled-tags:
- diagnostic
- style
- performance
gosec:
excludes:
- G101
- G112
- G402
- G404
- G501
- G505
exclude-generated: true
reassign:
patterns:

View File

@ -144,6 +144,7 @@ func (a *action) runReadDepsFile(c *cli.Context) (depsStr string, useDepFile boo
return "", false, fmt.Errorf("failed to parse deps file url %s: %w", a.flags.depsURL, err)
}
// nolint:noctx
httpRsp, err := http.Get(depsURL.String())
if err != nil {
return "", false, fmt.Errorf("failed to http get %s: %w", depsURL.String(), err)