We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 451d089 commit af7b672Copy full SHA for af7b672
analyzer/testdata/src/gocritic/rules.go
@@ -79,13 +79,8 @@ func testRules(m dsl.Matcher) {
79
Where(m["arr"].Type.Is(`*[$_]$_`)).
80
Report(`explicit array deref is redundant`)
81
82
- // Can factor into a single rule when || operator
83
- // is supported in filters.
84
m.Match(`$s[:]`).
85
- Where(m["s"].Type.Is(`string`)).
86
- Report(`can simplify $$ to $s`)
87
- m.Match(`$s[:]`).
88
- Where(m["s"].Type.Is(`[]$_`)).
+ Where(m["s"].Type.Is(`string`) || m["s"].Type.Is(`[]$_`)).
89
Report(`can simplify $$ to $s`)
90
91
m.Match(`switch $_ {case $_: $*_}`,
0 commit comments