File tree 3 files changed +17
-8
lines changed
3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -343,14 +343,17 @@ linters-settings:
343
343
min-complexity : 10
344
344
345
345
godot :
346
- # comments to be checked: `declarations`, `toplevel`, or `all`
347
- scope : declarations
346
+ # comments to be checked: `declarations`, `toplevel`, or `all` (default: declarations)
347
+ scope : toplevel
348
348
# list of regexps for excluding particular comment lines from check
349
349
exclude :
350
- # example: exclude comments which contain numbers
351
- # - '[0-9]+'
352
- # check that each sentence starts with a capital letter
353
- capital : false
350
+ # exclude todo and fixme comments
351
+ - " ^fixme:"
352
+ - " ^todo:"
353
+ # check that each sentence ends with a period (default: true)
354
+ period : false
355
+ # check that each sentence starts with a capital letter (default: false)
356
+ capital : true
354
357
355
358
godox :
356
359
# report any comments starting with keywords, this is useful for TODO or FIXME comments that
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ var defaultLintersSettings = LintersSettings{
35
35
Godox : GodoxSettings {
36
36
Keywords : []string {},
37
37
},
38
+ Godot : GodotSettings {
39
+ Scope : "declarations" ,
40
+ Period : true ,
41
+ },
38
42
Gofumpt : GofumptSettings {
39
43
LangVersion : "" ,
40
44
ExtraRules : false ,
@@ -266,6 +270,7 @@ type GodotSettings struct {
266
270
Scope string `mapstructure:"scope"`
267
271
Exclude []string `mapstructure:"exclude"`
268
272
Capital bool `mapstructure:"capital"`
273
+ Period bool `mapstructure:"period"`
269
274
270
275
// Deprecated: use `Scope` instead
271
276
CheckAll bool `mapstructure:"check-all"`
Original file line number Diff line number Diff line change @@ -31,13 +31,14 @@ func NewGodot() *goanalysis.Linter {
31
31
settings := godot.Settings {
32
32
Scope : godot .Scope (cfg .Scope ),
33
33
Exclude : cfg .Exclude ,
34
- Period : true ,
34
+ Period : cfg . Period ,
35
35
Capital : cfg .Capital ,
36
36
}
37
37
38
38
// Convert deprecated setting
39
+ // todo(butuzov): remove on v2 release
39
40
if cfg .CheckAll { // nolint:staticcheck
40
- settings .Scope = godot .TopLevelScope
41
+ settings .Scope = godot .AllScope
41
42
}
42
43
43
44
if settings .Scope == "" {
You can’t perform that action at this time.
0 commit comments