Skip to content

Commit

Permalink
fixup! Support maintidx
Browse files Browse the repository at this point in the history
  • Loading branch information
yagipy committed Jan 15, 2022
1 parent 4c856d9 commit 43bbda4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .golangci.example.yml
Expand Up @@ -590,6 +590,10 @@ linters-settings:
# tab width in spaces. Default to 1.
tab-width: 1

maintidx:
# show functions with maintainability index < N only.
under: 20

makezero:
# Allow only slices initialized with a length of zero. Default is false.
always: false
Expand Down Expand Up @@ -1117,10 +1121,6 @@ linters-settings:
force-short-decl-cuddling: false
strict-append: true

maintidx:
# show functions with maintainability index < N only.
under: 20

# The custom section can be used to define linter plugins to be loaded at runtime.
# See README doc for more info.
custom:
Expand Down
2 changes: 1 addition & 1 deletion pkg/lint/lintersdb/manager.go
Expand Up @@ -441,7 +441,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.8.0").
WithPresets(linter.PresetStyle),

linter.NewConfig(golinters.NewMaintIdx()).
linter.NewConfig(golinters.NewMaintIdx(maintIdxCfg)).
WithSince("v1.1.0").
WithPresets(linter.PresetComplexity).
WithLoadForGoAnalysis().
Expand Down

0 comments on commit 43bbda4

Please sign in to comment.