Skip to content

Commit

Permalink
chore: Switch lint config from disable-all to enable-all (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
k15r authored Apr 18, 2024
1 parent b6ee504 commit 4bafd5c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 36 deletions.
93 changes: 58 additions & 35 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,62 @@ run:
build-tags:
- e2e
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bodyclose
- dogsled
- dupl
- dupword
- errcheck
- errchkjson
- exportloopref
- gci
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoinits
- gocyclo
- gofmt
- goimports
- gosec
- gosimple
- govet
- importas
- ineffassign
- loggercheck
- misspell
- misspell
- nilnil
- nolintlint
- revive
- staticcheck
- stylecheck
- typecheck
- unparam
- unused
enable-all: true
disable:
# Depreacted linters
- deadcode
- exhaustivestruct
- golint
- ifshort
- interfacer
- maligned
- nosnakecase
- scopelint
- structcheck
- varcheck
# Linters to be enabled after fixing the issues
- intrange
- copyloopvar
- cyclop
- depguard
- errname
- errorlint
- exhaustive
- exhaustruct
- forcetypeassert
- funlen
- gochecknoglobals
- goconst
- gocritic
- godot
- godox
- goerr113
- gofumpt
- gomnd
- ireturn
- lll
- maintidx
- makezero
- mirror
- nestif
- nlreturn
- noctx
- nonamedreturns
- paralleltest
- perfsprint
- prealloc
- predeclared
- protogetter
- tagliatelle
- testifylint
- testpackage
- thelper
- tparallel
- varnamelen
- wastedassign
- whitespace
- wrapcheck
- wsl

linters-settings:
dupl:
Expand Down Expand Up @@ -134,7 +156,8 @@ linters-settings:
local-prefixes: github.com/kyma-project/telemetry-manager

govet:
enable: ['shadow']
enable:
- shadow

loggercheck:
klog: true # Allows checking for the k8s.io/klog/v2.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/kyma-project/telemetry-manager

go 1.22
go 1.22.2

require (
github.com/go-logr/logr v1.4.1
Expand Down

0 comments on commit 4bafd5c

Please sign in to comment.