@@ -701,11 +701,11 @@ linters-settings:
701
701
# List of allowed modules.
702
702
# Default: []
703
703
modules :
704
- - gopkg.in/yaml.v2
704
+ - gopkg.in/yaml.v2
705
705
# List of allowed module domains.
706
706
# Default: []
707
707
domains :
708
- - golang.org
708
+ - golang.org
709
709
blocked :
710
710
# List of blocked modules.
711
711
# Default: []
@@ -1286,21 +1286,21 @@ linters-settings:
1286
1286
# Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
1287
1287
# Default: []
1288
1288
disabled-linters :
1289
- - Help
1290
- - MetricUnits
1291
- - Counter
1292
- - HistogramSummaryReserved
1293
- - MetricTypeInName
1294
- - ReservedChars
1295
- - CamelCase
1296
- - UnitAbbreviations
1289
+ - Help
1290
+ - MetricUnits
1291
+ - Counter
1292
+ - HistogramSummaryReserved
1293
+ - MetricTypeInName
1294
+ - ReservedChars
1295
+ - CamelCase
1296
+ - UnitAbbreviations
1297
1297
1298
1298
reassign :
1299
1299
# Patterns for global variable names that are checked for reassignment.
1300
1300
# See https://github.com/curioswitch/go-reassign#usage
1301
1301
# Default: ["EOF", "Err.*"]
1302
1302
patterns :
1303
- - " .*"
1303
+ - " .*"
1304
1304
1305
1305
revive :
1306
1306
# Maximum number of open files at the same time.
@@ -1341,7 +1341,7 @@ linters-settings:
1341
1341
- name : argument-limit
1342
1342
severity : warning
1343
1343
disabled : false
1344
- arguments : [4 ]
1344
+ arguments : [ 4 ]
1345
1345
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic
1346
1346
- name : atomic
1347
1347
severity : warning
@@ -1350,7 +1350,7 @@ linters-settings:
1350
1350
- name : banned-characters
1351
1351
severity : warning
1352
1352
disabled : false
1353
- arguments : ["Ω","Σ","σ", "7"]
1353
+ arguments : [ "Ω","Σ","σ", "7" ]
1354
1354
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return
1355
1355
- name : bare-return
1356
1356
severity : warning
@@ -1452,8 +1452,8 @@ linters-settings:
1452
1452
severity : warning
1453
1453
disabled : false
1454
1454
arguments :
1455
- - " checkPrivateReceivers"
1456
- - " sayRepetitiveInsteadOfStutters"
1455
+ - " checkPrivateReceivers"
1456
+ - " sayRepetitiveInsteadOfStutters"
1457
1457
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
1458
1458
- name : file-header
1459
1459
severity : warning
@@ -1594,8 +1594,8 @@ linters-settings:
1594
1594
severity : warning
1595
1595
disabled : false
1596
1596
arguments :
1597
- - [ "ID" ] # AllowList
1598
- - [ "VM" ] # DenyList
1597
+ - [ "ID" ] # AllowList
1598
+ - [ "VM" ] # DenyList
1599
1599
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
1600
1600
- name : var-declaration
1601
1601
severity : warning
@@ -1893,56 +1893,57 @@ linters-settings:
1893
1893
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for documentation of available settings.
1894
1894
# These are the defaults for `golangci-lint`.
1895
1895
1896
- # Controls if you may cuddle assignments and anything without needing an empty line between them.
1897
- # Default: false
1898
- allow-assign-and-anything : false
1899
-
1900
- # Controls if you may cuddle assignments and calls without needing an empty line between them.
1901
- # Default: true
1896
+ # Do strict checking when assigning from append (x = append(x, y)). If
1897
+ # this is set to true - the append call must append either a variable
1898
+ # assigned, called or used on the line above.
1899
+ strict-append : true
1900
+
1901
+ # Allows assignments to be cuddled with variables used in calls on
1902
+ # line above and calls to be cuddled with assignments of variables
1903
+ # used in call on line above.
1902
1904
allow-assign-and-call : true
1903
-
1904
- # Controls if you're allowed to cuddle multiple declarations.
1905
- # This is false by default to encourage you to group them in one var block.
1906
- # One major benefit with this is that if the variables are assigned the assignments will be tabulated.
1907
- # Default: false
1908
- allow-cuddle-declarations : false
1909
-
1910
- # Controls if you may cuddle assignments even if they span over multiple lines.
1911
- # Default: true
1905
+
1906
+ # Allows assignments to be cuddled with anything.
1907
+ allow-assign-and-anything : false
1908
+
1909
+ # Allows cuddling to assignments even if they span over multiple lines.
1912
1910
allow-multiline-assign : true
1913
-
1914
- # This option allows whitespace after each comment group that begins a block.
1915
- # Default: false
1916
- allow-separated-leading-comment : false
1917
-
1918
- # Controls if blocks can end with comments.
1919
- # This is not encouraged sine it's usually code smell but might be useful do improve understanding or learning purposes.
1920
- # To be allowed there must be no whitespace between the comment and the last statement or the comment and the closing brace.
1921
- # Default: false
1922
- allow-trailing-comment : false
1923
-
1924
- # Can be set to force trailing newlines at the end of case blocks to improve readability.
1925
- # If the number of lines (including comments) in a case block exceeds this number
1926
- # a linter error will be yielded if the case does not end with a newline.
1927
- # Default: 0
1911
+
1912
+ # If the number of lines in a case block is equal to or lager than this
1913
+ # number, the case *must* end white a newline.
1928
1914
force-case-trailing-whitespace : 0
1929
-
1930
- # Enforces that an `if` statement checking an error variable is cuddled
1931
- # with the line that assigned that error variable.
1932
- # Default: false
1933
- force-err-cuddling : false
1934
-
1935
- # Enforces that an assignment which is actually a short declaration (using `:=`)
1936
- # is only allowed to cuddle with other short declarations, and not plain assignments, blocks, etc.
1937
- # This rule helps make declarations stand out by themselves, much the same as grouping var statement.
1938
- # Default: false
1915
+
1916
+ # Allow blocks to end with comments.
1917
+ allow-trailing-comment : false
1918
+
1919
+ # Allow multiple comments in the beginning of a block separated with newline.
1920
+ allow-separated-leading-comment : false
1921
+
1922
+ # Allow multiple var/declaration statements to be cuddled.
1923
+ allow-cuddle-declarations : false
1924
+
1925
+ # Aa list of call idents that everything can be cuddled with.
1926
+ # Defaults to calls looking like locks.
1927
+ allow-cuddle-with-calls : [ "Lock", "RLock" ]
1928
+
1929
+ # AllowCuddleWithRHS is a list of right hand side variables that is allowed
1930
+ # to be cuddled with anything. Defaults to assignments or calls looking
1931
+ # like unlocks.
1932
+ allow-cuddle-with-rhs : [ "Unlock", "RUnlock" ]
1933
+
1934
+ # Causes an error when an If statement that checks an error variable doesn't
1935
+ # cuddle with the assignment of that variable.
1936
+ enforce-err-cuddling : false
1937
+
1938
+ # When enforce-err-cuddling is enabled this is a list of names
1939
+ # used for error variables to check for in the conditional.
1940
+ error-variable-names : [ "err" ]
1941
+
1942
+ # Causes an error if a short declaration (:=) cuddles with anything other than
1943
+ # another short declaration.
1944
+ # This logic overrides enforce-err-cuddling among others.
1939
1945
force-short-decl-cuddling : false
1940
1946
1941
- # Controls if the checks for slice append should be "strict"
1942
- # in the sense that it will only allow these assignments to be cuddled with variables being appended.
1943
- # Default: true
1944
- strict-append : true
1945
-
1946
1947
# The custom section can be used to define linter plugins to be loaded at runtime.
1947
1948
# See README documentation for more info.
1948
1949
custom :
@@ -2317,5 +2318,5 @@ severity:
2317
2318
# Default: []
2318
2319
rules :
2319
2320
- linters :
2320
- - dupl
2321
+ - dupl
2321
2322
severity : info
0 commit comments