Add "exclude" option for godot linter (#1669)

This commit is contained in:
Denis Krivak 2021-01-29 17:23:12 +03:00 committed by GitHub
parent 5d75889cb1
commit 89367aee22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -193,6 +193,10 @@ linters-settings:
godot:
# comments to be checked: `declarations`, `toplevel`, or `all`
scope: declarations
# list of regexps for excluding particular comment lines from check
exclude:
# example: exclude comments which contain numbers
# - '[0-9]+'
# check that each sentence starts with a capital letter
capital: false
godox:

View File

@ -357,6 +357,7 @@ type WSLSettings struct {
type GodotSettings struct {
Scope string `mapstructure:"scope"`
Exclude []string `mapstructure:"exclude"`
Capital bool `mapstructure:"capital"`
// Deprecated: use `Scope` instead

View File

@ -30,6 +30,7 @@ func NewGodot() *goanalysis.Linter {
cfg := lintCtx.Cfg.LintersSettings.Godot
settings := godot.Settings{
Scope: godot.Scope(cfg.Scope),
Exclude: cfg.Exclude,
Period: true,
Capital: cfg.Capital,
}