Skip to content

Commit

Permalink
Remove ifshort linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Simonov committed Jul 31, 2022
1 parent 5a8b7f4 commit 136b98a
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 70 deletions.
11 changes: 0 additions & 11 deletions .golangci.reference.yml
Expand Up @@ -1036,15 +1036,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 @@ -1889,7 +1880,6 @@ linters:
- gosimple
- govet
- grouper
- ifshort
- importas
- ineffassign
- interfacer
Expand Down Expand Up @@ -1990,7 +1980,6 @@ linters:
- gosimple
- govet
- grouper
- ifshort
- importas
- ineffassign
- interfacer
Expand Down
1 change: 0 additions & 1 deletion go.mod
Expand Up @@ -23,7 +23,6 @@ require (
github.com/charithe/durationcheck v0.0.9
github.com/daixiang0/gci v0.5.0
github.com/denis-tingaikin/go-header v0.4.3
github.com/esimonov/ifshort v1.0.4
github.com/fatih/color v1.13.0
github.com/firefart/nonamedreturns v1.0.4
github.com/fzipp/gocyclo v0.6.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum

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

10 changes: 0 additions & 10 deletions pkg/config/linters_settings.go
Expand Up @@ -58,10 +58,6 @@ var defaultLintersSettings = LintersSettings{
Gosec: GoSecSettings{
Concurrency: runtime.NumCPU(),
},
Ifshort: IfshortSettings{
MaxDeclLines: 1,
MaxDeclChars: 30,
},
Lll: LllSettings{
LineLength: 120,
TabWidth: 1,
Expand Down Expand Up @@ -150,7 +146,6 @@ type LintersSettings struct {
Gosimple StaticCheckSettings
Govet GovetSettings
Grouper GrouperSettings
Ifshort IfshortSettings
ImportAs ImportAsSettings
Ireturn IreturnSettings
Lll LllSettings
Expand Down Expand Up @@ -427,11 +422,6 @@ type GrouperSettings struct {
VarRequireGrouping bool `mapstructure:"var-require-grouping"`
}

type IfshortSettings struct {
MaxDeclLines int `mapstructure:"max-decl-lines"`
MaxDeclChars int `mapstructure:"max-decl-chars"`
}

type ImportAsSettings struct {
Alias []ImportAsAlias
NoUnaliased bool `mapstructure:"no-unaliased"`
Expand Down
28 changes: 0 additions & 28 deletions pkg/golinters/ifshort.go

This file was deleted.

7 changes: 0 additions & 7 deletions pkg/lint/lintersdb/manager.go
Expand Up @@ -135,7 +135,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
gosimpleCfg *config.StaticCheckSettings
govetCfg *config.GovetSettings
grouperCfg *config.GrouperSettings
ifshortCfg *config.IfshortSettings
importAsCfg *config.ImportAsSettings
ireturnCfg *config.IreturnSettings
lllCfg *config.LllSettings
Expand Down Expand Up @@ -206,7 +205,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
gosimpleCfg = &m.cfg.LintersSettings.Gosimple
govetCfg = &m.cfg.LintersSettings.Govet
grouperCfg = &m.cfg.LintersSettings.Grouper
ifshortCfg = &m.cfg.LintersSettings.Ifshort
importAsCfg = &m.cfg.LintersSettings.ImportAs
ireturnCfg = &m.cfg.LintersSettings.Ireturn
lllCfg = &m.cfg.LintersSettings.Lll
Expand Down Expand Up @@ -538,11 +536,6 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithPresets(linter.PresetStyle).
WithURL("https://github.com/leonklingele/grouper"),

linter.NewConfig(golinters.NewIfshort(ifshortCfg)).
WithSince("v1.36.0").
WithPresets(linter.PresetStyle).
WithURL("https://github.com/esimonov/ifshort"),

linter.NewConfig(golinters.NewImportAs(importAsCfg)).
WithSince("v1.38.0").
WithPresets(linter.PresetStyle).
Expand Down
11 changes: 0 additions & 11 deletions test/testdata/ifshort.go

This file was deleted.

0 comments on commit 136b98a

Please sign in to comment.