File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1953,15 +1953,15 @@ linters-settings:
1953
1953
1954
1954
# Causes an error when an If statement that checks an error variable doesn't
1955
1955
# cuddle with the assignment of that variable.
1956
- enforce -err-cuddling : false
1956
+ force -err-cuddling : false
1957
1957
1958
- # When enforce -err-cuddling is enabled this is a list of names
1958
+ # When force -err-cuddling is enabled this is a list of names
1959
1959
# used for error variables to check for in the conditional.
1960
1960
error-variable-names : [ "err" ]
1961
1961
1962
1962
# Causes an error if a short declaration (:=) cuddles with anything other than
1963
1963
# another short declaration.
1964
- # This logic overrides enforce -err-cuddling among others.
1964
+ # This logic overrides force -err-cuddling among others.
1965
1965
force-short-decl-cuddling : false
1966
1966
1967
1967
# The custom section can be used to define linter plugins to be loaded at runtime.
Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ type WSLSettings struct {
713
713
AllowCuddleDeclaration bool `mapstructure:"allow-cuddle-declarations"`
714
714
AllowCuddleWithCalls []string `mapstructure:"allow-cuddle-with-calls"`
715
715
AllowCuddleWithRHS []string `mapstructure:"allow-cuddle-with-rhs"`
716
- ForceCuddleErrCheckAndAssign bool `mapstructure:"enforce -err-cuddling"`
716
+ ForceCuddleErrCheckAndAssign bool `mapstructure:"force -err-cuddling"`
717
717
ErrorVariableNames []string `mapstructure:"error-variable-names"`
718
718
ForceExclusiveShortDeclarations bool `mapstructure:"force-short-decl-cuddling"`
719
719
}
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ func NewWSL(settings *config.WSLSettings) *goanalysis.Linter {
32
32
conf .AllowCuddleDeclaration = settings .AllowCuddleDeclaration
33
33
conf .AllowCuddleWithCalls = settings .AllowCuddleWithCalls
34
34
conf .AllowCuddleWithRHS = settings .AllowCuddleWithRHS
35
+ conf .ForceCuddleErrCheckAndAssign = settings .ForceCuddleErrCheckAndAssign
36
+ conf .ErrorVariableNames = settings .ErrorVariableNames
37
+ conf .ForceExclusiveShortDeclarations = settings .ForceExclusiveShortDeclarations
35
38
}
36
39
37
40
analyzer := & analysis.Analyzer {
You can’t perform that action at this time.
0 commit comments