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

feat: inactivate deprecated linters #4436

Merged
merged 6 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
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
64 changes: 10 additions & 54 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,6 @@ linters-settings:
# Default: false
default-case-required: true

exhaustivestruct:
# Struct Patterns is list of expressions to match struct packages and names.
# The struct packages have the form `example.com/package.ExampleStruct`.
# The matching patterns can use matching syntax from https://pkg.go.dev/path#Match.
# If this list is empty, all structs are tested.
# Default: []
struct-patterns:
- '*.Test'
- 'example.com/package.ExampleStruct'

exhaustruct:
# List of regular expressions to match struct packages and their names.
# Regular expressions must match complete canonical struct package/name/structname.
Expand Down Expand Up @@ -772,11 +762,6 @@ linters-settings:
# Default: ""
local-prefixes: github.com/org/project

golint:
# Minimal confidence for issues.
# Default: 0.8
min-confidence: 0.7

gomnd:
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
Expand Down Expand Up @@ -1241,15 +1226,6 @@ linters-settings:
# Default: false
var-require-grouping: true

ifshort:
# Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
# Has higher priority than max-decl-chars.
# Default: 1
max-decl-lines: 2
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
# Default: 30
max-decl-chars: 40

importas:
# Do not allow unaliased imports of aliased packages.
# Default: false
Expand Down Expand Up @@ -1353,11 +1329,6 @@ linters-settings:
# Default: false
always: true

maligned:
# Print struct with more effective memory layout or not.
# Default: false
suggest-new: true

misspell:
# Correct spellings using locale preferences for US or UK.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
Expand Down Expand Up @@ -2338,11 +2309,6 @@ linters-settings:
# Default: true
generated-is-used: false

varcheck:
# Check usage of exported fields and variables.
# Default: false
exported-fields: true

varnamelen:
# The longest distance, in source lines, that is being considered a "small scope".
# Variables used in at most this many lines will be ignored.
Expand Down Expand Up @@ -2519,7 +2485,6 @@ linters:
- contextcheck
- copyloopvar
- cyclop
- deadcode
- decorder
- depguard
- dogsled
Expand All @@ -2532,7 +2497,6 @@ linters:
- errorlint
- execinquery
- exhaustive
- exhaustivestruct
- exhaustruct
- exportloopref
- forbidigo
Expand All @@ -2555,7 +2519,6 @@ linters:
- gofumpt
- goheader
- goimports
- golint
- gomnd
- gomoddirectives
- gomodguard
Expand All @@ -2565,19 +2528,16 @@ linters:
- gosmopolitan
- govet
- grouper
- ifshort
- importas
- inamedparam
- ineffassign
- interfacebloat
- interfacer
- intrange
- ireturn
- lll
- loggercheck
- maintidx
- makezero
- maligned
- mirror
- misspell
- musttag
Expand All @@ -2589,7 +2549,6 @@ linters:
- noctx
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- perfsprint
Expand All @@ -2600,12 +2559,10 @@ linters:
- reassign
- revive
- rowserrcheck
- scopelint
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagalign
- tagliatelle
Expand All @@ -2620,7 +2577,6 @@ linters:
- unparam
- unused
- usestdlibvars
- varcheck
- varnamelen
- wastedassign
- whitespace
Expand All @@ -2642,7 +2598,6 @@ linters:
- contextcheck
- copyloopvar
- cyclop
- deadcode
- decorder
- depguard
- dogsled
Expand All @@ -2655,7 +2610,6 @@ linters:
- errorlint
- execinquery
- exhaustive
- exhaustivestruct
- exhaustruct
- exportloopref
- forbidigo
Expand All @@ -2678,7 +2632,6 @@ linters:
- gofumpt
- goheader
- goimports
- golint
- gomnd
- gomoddirectives
- gomodguard
Expand All @@ -2688,19 +2641,16 @@ linters:
- gosmopolitan
- govet
- grouper
- ifshort
- importas
- inamedparam
- ineffassign
- interfacebloat
- interfacer
- intrange
- ireturn
- lll
- loggercheck
- maintidx
- makezero
- maligned
- mirror
- misspell
- musttag
Expand All @@ -2712,7 +2662,6 @@ linters:
- noctx
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- perfsprint
Expand All @@ -2723,12 +2672,10 @@ linters:
- reassign
- revive
- rowserrcheck
- scopelint
- sloglint
- spancheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagalign
- tagliatelle
Expand All @@ -2743,13 +2690,22 @@ linters:
- unparam
- unused
- usestdlibvars
- varcheck
- varnamelen
- wastedassign
- whitespace
- wrapcheck
- wsl
- zerologlint
- deadcode # Deprecated
ldez marked this conversation as resolved.
Show resolved Hide resolved
- exhaustivestruct # Deprecated
- golint # Deprecated
- ifshort # Deprecated
- interfacer # Deprecated
ldez marked this conversation as resolved.
Show resolved Hide resolved
- maligned # Deprecated
- nosnakecase # Deprecated
- scopelint # Deprecated
- structcheck # Deprecated
- varcheck # Deprecated

# Enable presets.
# https://golangci-lint.run/usage/linters
Expand Down
9 changes: 0 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ require (
github.com/curioswitch/go-reassign v0.2.0
github.com/daixiang0/gci v0.13.0
github.com/denis-tingaikin/go-header v0.5.0
github.com/esimonov/ifshort v1.0.4
github.com/fatih/color v1.16.0
github.com/firefart/nonamedreturns v1.0.4
github.com/fzipp/gocyclo v0.6.0
Expand All @@ -42,12 +41,8 @@ require (
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1
github.com/go-xmlfmt/xmlfmt v1.1.2
github.com/gofrs/flock v0.8.1
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
github.com/golangci/misspell v0.4.1
github.com/golangci/revgrep v0.5.2
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
Expand Down Expand Up @@ -76,7 +71,6 @@ require (
github.com/maratori/testpackage v1.1.1
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
github.com/mattn/go-colorable v0.1.13
github.com/mbilski/exhaustivestruct v1.2.0
github.com/mgechev/revive v1.3.7
github.com/mitchellh/go-homedir v1.1.0
github.com/mitchellh/go-ps v1.0.0
Expand All @@ -97,7 +91,6 @@ require (
github.com/shirou/gopsutil/v3 v3.24.2
github.com/sirupsen/logrus v1.9.3
github.com/sivchari/containedctx v1.0.3
github.com/sivchari/nosnakecase v1.7.0
github.com/sivchari/tenv v1.7.1
github.com/sonatard/noctx v0.0.2
github.com/sourcegraph/go-diff v0.7.0
Expand Down Expand Up @@ -130,7 +123,6 @@ require (
gopkg.in/yaml.v3 v3.0.1
honnef.co/go/tools v0.4.7
mvdan.cc/gofumpt v0.6.0
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14
)

Expand Down Expand Up @@ -201,5 +193,4 @@ require (
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
)
19 changes: 0 additions & 19 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading