Skip to content

Commit 588af2f

Browse files
committed
gocritic: add new checks
1 parent 657bc31 commit 588af2f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.golangci.next.reference.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,9 @@ linters:
811811
# Detects multiple imports of the same package under different aliases.
812812
# https://go-critic.com/overview.html#dupimport
813813
- dupImport
814+
# Detects duplicated option function arguments in variadic function calls.
815+
# https://go-critic.com/overview.html#dupoption
816+
- dupOption
814817
# Detects suspicious duplicated sub-expressions.
815818
# https://go-critic.com/overview.html#dupsubexpr
816819
- dupSubExpr
@@ -1045,6 +1048,9 @@ linters:
10451048
# Detects Yoda style expressions and suggests to replace them.
10461049
# https://go-critic.com/overview.html#yodastyleexpr
10471050
- yodaStyleExpr
1051+
# Detects bytes.Repeat with 0 value.
1052+
# https://go-critic.com/overview.html#zerobyterepeat
1053+
- zeroByteRepeat
10481054

10491055
# Enable all checks.
10501056
# Default: false

jsonschema/golangci.next.jsonschema.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"dupBranchBody",
3333
"dupCase",
3434
"dupImport",
35+
"dupOption",
3536
"dupSubExpr",
3637
"dynamicFmtString",
3738
"elseif",
@@ -53,7 +54,6 @@
5354
"importShadow",
5455
"indexAlloc",
5556
"initClause",
56-
"ioutilDeprecated",
5757
"mapKey",
5858
"methodExprCall",
5959
"nestingReduce",
@@ -110,7 +110,8 @@
110110
"weakCond",
111111
"whyNoLint",
112112
"wrapperFunc",
113-
"yodaStyleExpr"
113+
"yodaStyleExpr",
114+
"zeroByteRepeat"
114115
]
115116
},
116117
"gocritic-tags": {

0 commit comments

Comments
 (0)