Skip to content

Commit

Permalink
fix(lint): disables deprecated linters (opendatahub-io#1068)
Browse files Browse the repository at this point in the history
Removes linters which are not maintained anymore and deprecated. Most
has been replaced with `unused` linter which is enabled by default.
  • Loading branch information
bartoszmajsak authored and openshift-merge-bot[bot] committed Jun 26, 2024
1 parent 114395b commit 862a677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,27 @@ linters:
enable-all: true
disable:
- containedctx # detects struct contained context.Context field
- deadcode # deprecated
- depguard # [replaced by gomodguard] checks if package imports are in a list of acceptable packages
- exhaustivestruct # Prevents empty struct. We use a lot of these so I think it is safe to disable.
- exhaustruct # Prevents empty struct. We use a lot of these so I think it is safe to disable.c
- forbidigo
- gochecknoglobals # Prevents use of global vars.
- gofumpt
- golint # deprecated
- gomnd # Doesnot allow hardcoded numbers
- gomoddirectives # Doesnot allow replace in go mod file
- ifshort # deprecated
- interfacer
- maligned # deprecated
- nestif
- nilnil
- nosnakecase # snakecase is used in a lot of places. Need to check if that is required.
- paralleltest # [too many false positives] detects missing usage of t.Parallel() method in your Go test
- scopelint # deprecated
- structcheck # deprecated
- tagliatelle
- varcheck # deprecated
- varnamelen # doesnot allow shorter names like c,k etc. But golang prefers short named vars.
- wsl # [too strict and mostly code is not more readable] whitespace linter forces you to use empty lines
- wrapcheck # check if this is required. Prevents direct return of err.
Expand Down
2 changes: 1 addition & 1 deletion controllers/status/reporter.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//nolint:structcheck,ireturn // Reason: false positive, complains about unused fields - see Update method. ireturn to statisfy client.Object interface
//nolint:ireturn //reason: return T which is expected to be satisfying client.Object interface
package status

import (
Expand Down

0 comments on commit 862a677

Please sign in to comment.