Skip to content

Commit 136b98a

Browse files
author
Eugene Simonov
committed
Remove ifshort linter
1 parent 5a8b7f4 commit 136b98a

File tree

7 files changed

+0
-70
lines changed

7 files changed

+0
-70
lines changed

.golangci.reference.yml

-11
Original file line numberDiff line numberDiff line change
@@ -1036,15 +1036,6 @@ linters-settings:
10361036
# Default: false
10371037
var-require-grouping: true
10381038

1039-
ifshort:
1040-
# Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
1041-
# Has higher priority than max-decl-chars.
1042-
# Default: 1
1043-
max-decl-lines: 2
1044-
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
1045-
# Default: 30
1046-
max-decl-chars: 40
1047-
10481039
importas:
10491040
# Do not allow unaliased imports of aliased packages.
10501041
# Default: false
@@ -1889,7 +1880,6 @@ linters:
18891880
- gosimple
18901881
- govet
18911882
- grouper
1892-
- ifshort
18931883
- importas
18941884
- ineffassign
18951885
- interfacer
@@ -1990,7 +1980,6 @@ linters:
19901980
- gosimple
19911981
- govet
19921982
- grouper
1993-
- ifshort
19941983
- importas
19951984
- ineffassign
19961985
- interfacer

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ require (
2323
github.com/charithe/durationcheck v0.0.9
2424
github.com/daixiang0/gci v0.5.0
2525
github.com/denis-tingaikin/go-header v0.4.3
26-
github.com/esimonov/ifshort v1.0.4
2726
github.com/fatih/color v1.13.0
2827
github.com/firefart/nonamedreturns v1.0.4
2928
github.com/fzipp/gocyclo v0.6.0

go.sum

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

pkg/config/linters_settings.go

-10
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ var defaultLintersSettings = LintersSettings{
5858
Gosec: GoSecSettings{
5959
Concurrency: runtime.NumCPU(),
6060
},
61-
Ifshort: IfshortSettings{
62-
MaxDeclLines: 1,
63-
MaxDeclChars: 30,
64-
},
6561
Lll: LllSettings{
6662
LineLength: 120,
6763
TabWidth: 1,
@@ -150,7 +146,6 @@ type LintersSettings struct {
150146
Gosimple StaticCheckSettings
151147
Govet GovetSettings
152148
Grouper GrouperSettings
153-
Ifshort IfshortSettings
154149
ImportAs ImportAsSettings
155150
Ireturn IreturnSettings
156151
Lll LllSettings
@@ -427,11 +422,6 @@ type GrouperSettings struct {
427422
VarRequireGrouping bool `mapstructure:"var-require-grouping"`
428423
}
429424

430-
type IfshortSettings struct {
431-
MaxDeclLines int `mapstructure:"max-decl-lines"`
432-
MaxDeclChars int `mapstructure:"max-decl-chars"`
433-
}
434-
435425
type ImportAsSettings struct {
436426
Alias []ImportAsAlias
437427
NoUnaliased bool `mapstructure:"no-unaliased"`

pkg/golinters/ifshort.go

-28
This file was deleted.

pkg/lint/lintersdb/manager.go

-7
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
135135
gosimpleCfg *config.StaticCheckSettings
136136
govetCfg *config.GovetSettings
137137
grouperCfg *config.GrouperSettings
138-
ifshortCfg *config.IfshortSettings
139138
importAsCfg *config.ImportAsSettings
140139
ireturnCfg *config.IreturnSettings
141140
lllCfg *config.LllSettings
@@ -206,7 +205,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
206205
gosimpleCfg = &m.cfg.LintersSettings.Gosimple
207206
govetCfg = &m.cfg.LintersSettings.Govet
208207
grouperCfg = &m.cfg.LintersSettings.Grouper
209-
ifshortCfg = &m.cfg.LintersSettings.Ifshort
210208
importAsCfg = &m.cfg.LintersSettings.ImportAs
211209
ireturnCfg = &m.cfg.LintersSettings.Ireturn
212210
lllCfg = &m.cfg.LintersSettings.Lll
@@ -538,11 +536,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
538536
WithPresets(linter.PresetStyle).
539537
WithURL("https://github.com/leonklingele/grouper"),
540538

541-
linter.NewConfig(golinters.NewIfshort(ifshortCfg)).
542-
WithSince("v1.36.0").
543-
WithPresets(linter.PresetStyle).
544-
WithURL("https://github.com/esimonov/ifshort"),
545-
546539
linter.NewConfig(golinters.NewImportAs(importAsCfg)).
547540
WithSince("v1.38.0").
548541
WithPresets(linter.PresetStyle).

test/testdata/ifshort.go

-11
This file was deleted.

0 commit comments

Comments
 (0)