Skip to content

Commit a087808

Browse files
authored
feat: inactivate deprecated linters (#4436)
1 parent 3866470 commit a087808

30 files changed

+114
-1360
lines changed

.golangci.reference.yml

+10-54
Original file line numberDiff line numberDiff line change
@@ -369,16 +369,6 @@ linters-settings:
369369
# Default: false
370370
default-case-required: true
371371

372-
exhaustivestruct:
373-
# Struct Patterns is list of expressions to match struct packages and names.
374-
# The struct packages have the form `example.com/package.ExampleStruct`.
375-
# The matching patterns can use matching syntax from https://pkg.go.dev/path#Match.
376-
# If this list is empty, all structs are tested.
377-
# Default: []
378-
struct-patterns:
379-
- '*.Test'
380-
- 'example.com/package.ExampleStruct'
381-
382372
exhaustruct:
383373
# List of regular expressions to match struct packages and their names.
384374
# Regular expressions must match complete canonical struct package/name/structname.
@@ -772,11 +762,6 @@ linters-settings:
772762
# Default: ""
773763
local-prefixes: github.com/org/project
774764

775-
golint:
776-
# Minimal confidence for issues.
777-
# Default: 0.8
778-
min-confidence: 0.7
779-
780765
gomnd:
781766
# List of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
782767
# Default: ["argument", "case", "condition", "operation", "return", "assign"]
@@ -1241,15 +1226,6 @@ linters-settings:
12411226
# Default: false
12421227
var-require-grouping: true
12431228

1244-
ifshort:
1245-
# Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
1246-
# Has higher priority than max-decl-chars.
1247-
# Default: 1
1248-
max-decl-lines: 2
1249-
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
1250-
# Default: 30
1251-
max-decl-chars: 40
1252-
12531229
importas:
12541230
# Do not allow unaliased imports of aliased packages.
12551231
# Default: false
@@ -1353,11 +1329,6 @@ linters-settings:
13531329
# Default: false
13541330
always: true
13551331

1356-
maligned:
1357-
# Print struct with more effective memory layout or not.
1358-
# Default: false
1359-
suggest-new: true
1360-
13611332
misspell:
13621333
# Correct spellings using locale preferences for US or UK.
13631334
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
@@ -2338,11 +2309,6 @@ linters-settings:
23382309
# Default: true
23392310
generated-is-used: false
23402311

2341-
varcheck:
2342-
# Check usage of exported fields and variables.
2343-
# Default: false
2344-
exported-fields: true
2345-
23462312
varnamelen:
23472313
# The longest distance, in source lines, that is being considered a "small scope".
23482314
# Variables used in at most this many lines will be ignored.
@@ -2519,7 +2485,6 @@ linters:
25192485
- contextcheck
25202486
- copyloopvar
25212487
- cyclop
2522-
- deadcode
25232488
- decorder
25242489
- depguard
25252490
- dogsled
@@ -2532,7 +2497,6 @@ linters:
25322497
- errorlint
25332498
- execinquery
25342499
- exhaustive
2535-
- exhaustivestruct
25362500
- exhaustruct
25372501
- exportloopref
25382502
- forbidigo
@@ -2555,7 +2519,6 @@ linters:
25552519
- gofumpt
25562520
- goheader
25572521
- goimports
2558-
- golint
25592522
- gomnd
25602523
- gomoddirectives
25612524
- gomodguard
@@ -2565,19 +2528,16 @@ linters:
25652528
- gosmopolitan
25662529
- govet
25672530
- grouper
2568-
- ifshort
25692531
- importas
25702532
- inamedparam
25712533
- ineffassign
25722534
- interfacebloat
2573-
- interfacer
25742535
- intrange
25752536
- ireturn
25762537
- lll
25772538
- loggercheck
25782539
- maintidx
25792540
- makezero
2580-
- maligned
25812541
- mirror
25822542
- misspell
25832543
- musttag
@@ -2589,7 +2549,6 @@ linters:
25892549
- noctx
25902550
- nolintlint
25912551
- nonamedreturns
2592-
- nosnakecase
25932552
- nosprintfhostport
25942553
- paralleltest
25952554
- perfsprint
@@ -2600,12 +2559,10 @@ linters:
26002559
- reassign
26012560
- revive
26022561
- rowserrcheck
2603-
- scopelint
26042562
- sloglint
26052563
- spancheck
26062564
- sqlclosecheck
26072565
- staticcheck
2608-
- structcheck
26092566
- stylecheck
26102567
- tagalign
26112568
- tagliatelle
@@ -2620,7 +2577,6 @@ linters:
26202577
- unparam
26212578
- unused
26222579
- usestdlibvars
2623-
- varcheck
26242580
- varnamelen
26252581
- wastedassign
26262582
- whitespace
@@ -2642,7 +2598,6 @@ linters:
26422598
- contextcheck
26432599
- copyloopvar
26442600
- cyclop
2645-
- deadcode
26462601
- decorder
26472602
- depguard
26482603
- dogsled
@@ -2655,7 +2610,6 @@ linters:
26552610
- errorlint
26562611
- execinquery
26572612
- exhaustive
2658-
- exhaustivestruct
26592613
- exhaustruct
26602614
- exportloopref
26612615
- forbidigo
@@ -2678,7 +2632,6 @@ linters:
26782632
- gofumpt
26792633
- goheader
26802634
- goimports
2681-
- golint
26822635
- gomnd
26832636
- gomoddirectives
26842637
- gomodguard
@@ -2688,19 +2641,16 @@ linters:
26882641
- gosmopolitan
26892642
- govet
26902643
- grouper
2691-
- ifshort
26922644
- importas
26932645
- inamedparam
26942646
- ineffassign
26952647
- interfacebloat
2696-
- interfacer
26972648
- intrange
26982649
- ireturn
26992650
- lll
27002651
- loggercheck
27012652
- maintidx
27022653
- makezero
2703-
- maligned
27042654
- mirror
27052655
- misspell
27062656
- musttag
@@ -2712,7 +2662,6 @@ linters:
27122662
- noctx
27132663
- nolintlint
27142664
- nonamedreturns
2715-
- nosnakecase
27162665
- nosprintfhostport
27172666
- paralleltest
27182667
- perfsprint
@@ -2723,12 +2672,10 @@ linters:
27232672
- reassign
27242673
- revive
27252674
- rowserrcheck
2726-
- scopelint
27272675
- sloglint
27282676
- spancheck
27292677
- sqlclosecheck
27302678
- staticcheck
2731-
- structcheck
27322679
- stylecheck
27332680
- tagalign
27342681
- tagliatelle
@@ -2743,13 +2690,22 @@ linters:
27432690
- unparam
27442691
- unused
27452692
- usestdlibvars
2746-
- varcheck
27472693
- varnamelen
27482694
- wastedassign
27492695
- whitespace
27502696
- wrapcheck
27512697
- wsl
27522698
- zerologlint
2699+
- deadcode # Deprecated
2700+
- exhaustivestruct # Deprecated
2701+
- golint # Deprecated
2702+
- ifshort # Deprecated
2703+
- interfacer # Deprecated
2704+
- maligned # Deprecated
2705+
- nosnakecase # Deprecated
2706+
- scopelint # Deprecated
2707+
- structcheck # Deprecated
2708+
- varcheck # Deprecated
27532709

27542710
# Enable presets.
27552711
# https://golangci-lint.run/usage/linters

go.mod

-9
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ require (
3333
github.com/curioswitch/go-reassign v0.2.0
3434
github.com/daixiang0/gci v0.13.0
3535
github.com/denis-tingaikin/go-header v0.5.0
36-
github.com/esimonov/ifshort v1.0.4
3736
github.com/fatih/color v1.16.0
3837
github.com/firefart/nonamedreturns v1.0.4
3938
github.com/fzipp/gocyclo v0.6.0
@@ -42,12 +41,8 @@ require (
4241
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1
4342
github.com/go-xmlfmt/xmlfmt v1.1.2
4443
github.com/gofrs/flock v0.8.1
45-
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
4644
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a
47-
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe
4845
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e
49-
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0
50-
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca
5146
github.com/golangci/misspell v0.4.1
5247
github.com/golangci/revgrep v0.5.2
5348
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4
@@ -76,7 +71,6 @@ require (
7671
github.com/maratori/testpackage v1.1.1
7772
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
7873
github.com/mattn/go-colorable v0.1.13
79-
github.com/mbilski/exhaustivestruct v1.2.0
8074
github.com/mgechev/revive v1.3.7
8175
github.com/mitchellh/go-homedir v1.1.0
8276
github.com/mitchellh/go-ps v1.0.0
@@ -97,7 +91,6 @@ require (
9791
github.com/shirou/gopsutil/v3 v3.24.2
9892
github.com/sirupsen/logrus v1.9.3
9993
github.com/sivchari/containedctx v1.0.3
100-
github.com/sivchari/nosnakecase v1.7.0
10194
github.com/sivchari/tenv v1.7.1
10295
github.com/sonatard/noctx v0.0.2
10396
github.com/sourcegraph/go-diff v0.7.0
@@ -130,7 +123,6 @@ require (
130123
gopkg.in/yaml.v3 v3.0.1
131124
honnef.co/go/tools v0.4.7
132125
mvdan.cc/gofumpt v0.6.0
133-
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
134126
mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14
135127
)
136128

@@ -201,5 +193,4 @@ require (
201193
google.golang.org/protobuf v1.31.0 // indirect
202194
gopkg.in/ini.v1 v1.67.0 // indirect
203195
gopkg.in/yaml.v2 v2.4.0 // indirect
204-
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
205196
)

go.sum

-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)