File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1928,15 +1928,15 @@ linters-settings:
1928
1928
1929
1929
# Causes an error when an If statement that checks an error variable doesn't
1930
1930
# cuddle with the assignment of that variable.
1931
- enforce -err-cuddling : false
1931
+ force -err-cuddling : false
1932
1932
1933
- # When enforce -err-cuddling is enabled this is a list of names
1933
+ # When force -err-cuddling is enabled this is a list of names
1934
1934
# used for error variables to check for in the conditional.
1935
1935
error-variable-names : [ "err" ]
1936
1936
1937
1937
# Causes an error if a short declaration (:=) cuddles with anything other than
1938
1938
# another short declaration.
1939
- # This logic overrides enforce -err-cuddling among others.
1939
+ # This logic overrides force -err-cuddling among others.
1940
1940
force-short-decl-cuddling : false
1941
1941
1942
1942
# 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