Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Skarlso committed Aug 6, 2024
1 parent 583ee2a commit 3d97982
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,44 @@ linters:
- containedctx # Struct should not contain context, action does.
- contextcheck
- cyclop # Complex functions are not good.
- deadcode
- depguard
- dogsled
- dupl # Check code duplications.
- execinquery
- exhaustive # Doesn't really make sense.
- exhaustivestruct
- exhaustruct # Doesn't really make sense.
- exportloopref
- forcetypeassert # Priority: that can lead to serious crashes.
- funlen # Break long functions.
- gci
- gochecknoglobals
- gochecknoinits # Init functions cause an import to have side effects,
- goerr113
- goimports # acts weirdly, dci handles imports anyway
- golint
- gomnd # Give constant values a name with constants.
- ifshort
- interfacebloat
- interfacer
- ireturn # Accept interface, return concrate.
- lll
- loggercheck # Doesn't really make sense.
- maligned
- nestif # Some nexted if statements are 8 or 9 deep.
- nilnil # A function should return either something valuable
- nonamedreturns # Either named return, or use simply `return`.
- nosnakecase
- paralleltest
- rowserrcheck
- scopelint
- sqlclosecheck
- structcheck
- tagliatelle
- testpackage # Blackbox testing is preffered.
- unparam
- varcheck
- varnamelen # m, d, p < These are not so meaningful variables.
- wastedassign
- wrapcheck
Expand Down Expand Up @@ -84,9 +95,6 @@ issues:
- path: cmds/
linters:
- forbidigo
- text: "should not use dot imports|don't use an underscore in package name"
linters:
- golint
- source: "https://"
linters:
- lll
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ clean: ## Runs go clean
go clean -i

GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.56.1
GOLANGCI_LINT_VERSION ?= v1.57.2

golangci-lint: $(GOLANGCI_LINT)
$(GOLANGCI_LINT): $(LOCALBIN)
Expand Down

0 comments on commit 3d97982

Please sign in to comment.