Skip to content

Commit 68d20b4

Browse files
ldezSeigeC
authored andcommitted
gci: fix configuration naming (golangci#2578)
1 parent 7d8f68d commit 68d20b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.golangci.example.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,11 @@ linters-settings:
300300

301301
# Checks that no inline Comments are present.
302302
# Default: false
303-
no-inlineComments: true
303+
no-inline-comments: true
304304

305305
# Checks that no prefix Comments(comment lines above an import) are present.
306306
# Default: false
307-
no-prefixComments: true
307+
no-prefix-comments: true
308308

309309
# Section configuration to compare against.
310310
# Section names are case-insensitive and may contain parameters in ().
@@ -318,7 +318,7 @@ linters-settings:
318318

319319
# Separators that should be present between sections.
320320
# Default: ["newLine"]
321-
sectionSeparators:
321+
section-separators:
322322
- newLine
323323

324324
gocognit:

pkg/config/linters_settings.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,10 @@ type FunlenSettings struct {
258258

259259
type GciSettings struct {
260260
LocalPrefixes string `mapstructure:"local-prefixes"` // Deprecated
261-
NoInlineComments bool `mapstructure:"no-inlineComments"`
262-
NoPrefixComments bool `mapstructure:"no-prefixComments"`
261+
NoInlineComments bool `mapstructure:"no-inline-comments"`
262+
NoPrefixComments bool `mapstructure:"no-prefix-comments"`
263263
Sections []string `mapstructure:"sections"`
264-
SectionSeparator []string `mapstructure:"sectionSeparators"`
264+
SectionSeparator []string `mapstructure:"section-separators"`
265265
}
266266

267267
type GocognitSettings struct {

0 commit comments

Comments
 (0)