Skip to content

Commit 43bbda4

Browse files
committed
fixup! Support maintidx
1 parent 4c856d9 commit 43bbda4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.golangci.example.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ linters-settings:
590590
# tab width in spaces. Default to 1.
591591
tab-width: 1
592592

593+
maintidx:
594+
# show functions with maintainability index < N only.
595+
under: 20
596+
593597
makezero:
594598
# Allow only slices initialized with a length of zero. Default is false.
595599
always: false
@@ -1117,10 +1121,6 @@ linters-settings:
11171121
force-short-decl-cuddling: false
11181122
strict-append: true
11191123

1120-
maintidx:
1121-
# show functions with maintainability index < N only.
1122-
under: 20
1123-
11241124
# The custom section can be used to define linter plugins to be loaded at runtime.
11251125
# See README doc for more info.
11261126
custom:

pkg/lint/lintersdb/manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
441441
WithSince("v1.8.0").
442442
WithPresets(linter.PresetStyle),
443443

444-
linter.NewConfig(golinters.NewMaintIdx()).
444+
linter.NewConfig(golinters.NewMaintIdx(maintIdxCfg)).
445445
WithSince("v1.1.0").
446446
WithPresets(linter.PresetComplexity).
447447
WithLoadForGoAnalysis().

0 commit comments

Comments
 (0)