@@ -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: []
@@ -1261,21 +1261,21 @@ linters-settings:
1261
1261
# Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
1262
1262
# Default: []
1263
1263
disabled-linters :
1264
- - Help
1265
- - MetricUnits
1266
- - Counter
1267
- - HistogramSummaryReserved
1268
- - MetricTypeInName
1269
- - ReservedChars
1270
- - CamelCase
1271
- - UnitAbbreviations
1264
+ - Help
1265
+ - MetricUnits
1266
+ - Counter
1267
+ - HistogramSummaryReserved
1268
+ - MetricTypeInName
1269
+ - ReservedChars
1270
+ - CamelCase
1271
+ - UnitAbbreviations
1272
1272
1273
1273
reassign :
1274
1274
# Patterns for global variable names that are checked for reassignment.
1275
1275
# See https://github.com/curioswitch/go-reassign#usage
1276
1276
# Default: ["EOF", "Err.*"]
1277
1277
patterns :
1278
- - " .*"
1278
+ - " .*"
1279
1279
1280
1280
revive :
1281
1281
# Maximum number of open files at the same time.
@@ -1316,7 +1316,7 @@ linters-settings:
1316
1316
- name : argument-limit
1317
1317
severity : warning
1318
1318
disabled : false
1319
- arguments : [4 ]
1319
+ arguments : [ 4 ]
1320
1320
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#atomic
1321
1321
- name : atomic
1322
1322
severity : warning
@@ -1325,7 +1325,7 @@ linters-settings:
1325
1325
- name : banned-characters
1326
1326
severity : warning
1327
1327
disabled : false
1328
- arguments : ["Ω","Σ","σ", "7"]
1328
+ arguments : [ "Ω","Σ","σ", "7" ]
1329
1329
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#bare-return
1330
1330
- name : bare-return
1331
1331
severity : warning
@@ -1427,8 +1427,8 @@ linters-settings:
1427
1427
severity : warning
1428
1428
disabled : false
1429
1429
arguments :
1430
- - " checkPrivateReceivers"
1431
- - " sayRepetitiveInsteadOfStutters"
1430
+ - " checkPrivateReceivers"
1431
+ - " sayRepetitiveInsteadOfStutters"
1432
1432
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
1433
1433
- name : file-header
1434
1434
severity : warning
@@ -1569,8 +1569,8 @@ linters-settings:
1569
1569
severity : warning
1570
1570
disabled : false
1571
1571
arguments :
1572
- - [ "ID" ] # AllowList
1573
- - [ "VM" ] # DenyList
1572
+ - [ "ID" ] # AllowList
1573
+ - [ "VM" ] # DenyList
1574
1574
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
1575
1575
- name : var-declaration
1576
1576
severity : warning
@@ -1868,56 +1868,57 @@ linters-settings:
1868
1868
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for documentation of available settings.
1869
1869
# These are the defaults for `golangci-lint`.
1870
1870
1871
- # Controls if you may cuddle assignments and anything without needing an empty line between them.
1872
- # Default: false
1873
- allow-assign-and-anything : false
1874
-
1875
- # Controls if you may cuddle assignments and calls without needing an empty line between them.
1876
- # Default: true
1871
+ # Do strict checking when assigning from append (x = append(x, y)). If
1872
+ # this is set to true - the append call must append either a variable
1873
+ # assigned, called or used on the line above.
1874
+ strict-append : true
1875
+
1876
+ # Allows assignments to be cuddled with variables used in calls on
1877
+ # line above and calls to be cuddled with assignments of variables
1878
+ # used in call on line above.
1877
1879
allow-assign-and-call : true
1878
-
1879
- # Controls if you're allowed to cuddle multiple declarations.
1880
- # This is false by default to encourage you to group them in one var block.
1881
- # One major benefit with this is that if the variables are assigned the assignments will be tabulated.
1882
- # Default: false
1883
- allow-cuddle-declarations : false
1884
-
1885
- # Controls if you may cuddle assignments even if they span over multiple lines.
1886
- # Default: true
1880
+
1881
+ # Allows assignments to be cuddled with anything.
1882
+ allow-assign-and-anything : false
1883
+
1884
+ # Allows cuddling to assignments even if they span over multiple lines.
1887
1885
allow-multiline-assign : true
1888
-
1889
- # This option allows whitespace after each comment group that begins a block.
1890
- # Default: false
1891
- allow-separated-leading-comment : false
1892
-
1893
- # Controls if blocks can end with comments.
1894
- # This is not encouraged sine it's usually code smell but might be useful do improve understanding or learning purposes.
1895
- # To be allowed there must be no whitespace between the comment and the last statement or the comment and the closing brace.
1896
- # Default: false
1897
- allow-trailing-comment : false
1898
-
1899
- # Can be set to force trailing newlines at the end of case blocks to improve readability.
1900
- # If the number of lines (including comments) in a case block exceeds this number
1901
- # a linter error will be yielded if the case does not end with a newline.
1902
- # Default: 0
1886
+
1887
+ # If the number of lines in a case block is equal to or lager than this
1888
+ # number, the case *must* end white a newline.
1903
1889
force-case-trailing-whitespace : 0
1904
-
1905
- # Enforces that an `if` statement checking an error variable is cuddled
1906
- # with the line that assigned that error variable.
1907
- # Default: false
1908
- force-err-cuddling : false
1909
-
1910
- # Enforces that an assignment which is actually a short declaration (using `:=`)
1911
- # is only allowed to cuddle with other short declarations, and not plain assignments, blocks, etc.
1912
- # This rule helps make declarations stand out by themselves, much the same as grouping var statement.
1913
- # Default: false
1890
+
1891
+ # Allow blocks to end with comments.
1892
+ allow-trailing-comment : false
1893
+
1894
+ # Allow multiple comments in the beginning of a block separated with newline.
1895
+ allow-separated-leading-comment : false
1896
+
1897
+ # Allow multiple var/declaration statements to be cuddled.
1898
+ allow-cuddle-declarations : false
1899
+
1900
+ # Aa list of call idents that everything can be cuddled with.
1901
+ # Defaults to calls looking like locks.
1902
+ allow-cuddle-with-calls : [ "Lock", "RLock" ]
1903
+
1904
+ # AllowCuddleWithRHS is a list of right hand side variables that is allowed
1905
+ # to be cuddled with anything. Defaults to assignments or calls looking
1906
+ # like unlocks.
1907
+ allow-cuddle-with-rhs : [ "Unlock", "RUnlock" ]
1908
+
1909
+ # Causes an error when an If statement that checks an error variable doesn't
1910
+ # cuddle with the assignment of that variable.
1911
+ enforce-err-cuddling : false
1912
+
1913
+ # When enforce-err-cuddling is enabled this is a list of names
1914
+ # used for error variables to check for in the conditional.
1915
+ error-variable-names : [ "err" ]
1916
+
1917
+ # Causes an error if a short declaration (:=) cuddles with anything other than
1918
+ # another short declaration.
1919
+ # This logic overrides enforce-err-cuddling among others.
1914
1920
force-short-decl-cuddling : false
1915
1921
1916
- # Controls if the checks for slice append should be "strict"
1917
- # in the sense that it will only allow these assignments to be cuddled with variables being appended.
1918
- # Default: true
1919
- strict-append : true
1920
-
1921
1922
# The custom section can be used to define linter plugins to be loaded at runtime.
1922
1923
# See README documentation for more info.
1923
1924
custom :
@@ -2292,5 +2293,5 @@ severity:
2292
2293
# Default: []
2293
2294
rules :
2294
2295
- linters :
2295
- - dupl
2296
+ - dupl
2296
2297
severity : info
0 commit comments