Skip to content

Commit

Permalink
chore: update linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Nov 14, 2024
1 parent 2dda695 commit d6f98c2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
env:
GO_VERSION: stable
GOLANGCI_LINT_VERSION: v1.61.0
GOLANGCI_LINT_VERSION: v1.62.0

steps:
- uses: actions/checkout@v4
Expand Down
84 changes: 41 additions & 43 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
run:
timeout: 5m
linters:
enable-all: true
disable:
- exportloopref # deprecated
- sqlclosecheck # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
- cyclop # duplicate of gocyclo
- lll
- dupl
- wsl
- nlreturn
- mnd
- err113
- wrapcheck
- exhaustive
- exhaustruct
- testpackage
- tparallel
- paralleltest
- prealloc
- forcetypeassert
- bodyclose # Too many false positives: https://github.com/timakin/bodyclose/issues/30
- varnamelen
- noctx
- tagliatelle
- nilnil
- ireturn
- nonamedreturns
- gochecknoglobals # TODO(ldez) should be use on the project
- nestif # TODO(ldez) should be use on the project
- musttag

linters-settings:
govet:
Expand Down Expand Up @@ -55,47 +84,6 @@ linters-settings:
sprintf1: true
strconcat: false

linters:
enable-all: true
disable:
- gomnd # deprecated
- execinquery # deprecated
- exportloopref # deprecated
- sqlclosecheck # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
- cyclop # duplicate of gocyclo
- lll
- dupl
- wsl
- nlreturn
- mnd
- err113
- wrapcheck
- exhaustive
- exhaustruct
- testpackage
- tparallel
- paralleltest
- prealloc
- forcetypeassert
- bodyclose # Too many false positives: https://github.com/timakin/bodyclose/issues/30
- varnamelen
- noctx
- tagliatelle
- nilnil
- ireturn
- nonamedreturns
- gochecknoglobals # TODO(ldez) should be use on the project
- nestif # TODO(ldez) should be use on the project
- musttag

output:
show-stats: true
sort-results: true
sort-order:
- linter
- file

issues:
exclude-use-default: false
max-issues-per-linter: 0
Expand Down Expand Up @@ -137,3 +125,13 @@ issues:
text: "float-compare: use assert\\.InEpsilon \\(or InDelta\\)" # TODO(ldez) must be fixed
- path: memmetrics/anomaly_test.go
text: "float-compare: use assert\\.InEpsilon \\(or InDelta\\)" # TODO(ldez) must be fixed

output:
show-stats: true
sort-results: true
sort-order:
- linter
- file

run:
timeout: 5m

0 comments on commit d6f98c2

Please sign in to comment.