Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup deprecated linter #25

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tested with golangci/golangci-lint:v1.57.1
# tested with golangci/golangci-lint:v1.61.0

linters:
enable-all: true
Expand All @@ -20,7 +20,7 @@ linters:
- gomnd
# Golang linter to check the errors handling expressions
# disabled because it forces a lot that does not work with golang github pkg errors
- goerr113
- err113
# Tool for detection of FIXME, TODO and other comment keywords
# disabled because it is ok
- godox
Expand All @@ -33,10 +33,6 @@ linters:
# nlreturn checks for a new line before return and branch statements to increase code clarity
# disabled because it is very annoying and brings little improvement
- nlreturn
# Checks if all struct's fields are initialized
# disabled because: 'This linter is meant to be used only for special cases.
# It is not recommended to use it for all files in a project.'
- exhaustivestruct
# forbidigo is a Go static analysis tool to forbidigo use of particular identifiers
# disabled because the linter forbids fmt.Printf/Errorf
- forbidigo
Expand All @@ -58,17 +54,6 @@ linters:
- ireturn
# prevents named returns. Disabled because we don't share the authors fervor against named returns
- nonamedreturns
# checks for casing, will error on generated proto code because some vars are always uppercased
- nosnakecase
# deprecated
- scopelint # replaced by exportloopref
- deadcode # replaced by unused
- structcheck # replaced by unused
- varcheck # replaced by unused
- maligned # replaced by govet fieldalignment
- golint # replaced by revive
- interfacer # archived, a tool that suggests interfaces is prone to bad suggestions
- ifshort # archived, false positives
- varnamelen # unneeded, short varnames can be reasonable i.e i= index, n= amount or s *Service, reviewer should pay attention to disapprove lines like ´for i, e := range l {}´
- protogetter # disabled because it is very annoying and brings little improvement

Expand Down Expand Up @@ -129,11 +114,10 @@ issues:
max-same-issues: 100
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-dirs:
- test(s)?/
- tests?/
- pkg/pb/
exclude-files:
- .*/generated\.go
- .*_test\.go
- .*_?generated\.go
exclude-rules:
# Exclude lll issues for long lines with go:generate
- linters:
Expand All @@ -145,6 +129,7 @@ issues:
text: "SA1019: package github.com/golang/protobuf/proto is deprecated:"

run:
tests: false
build-tags:
- codeanalysis
timeout: 10m
Expand Down
Loading