Skip to content

Commit

Permalink
ST1003: add exception for fuzz functions
Browse files Browse the repository at this point in the history
Closes: gh-1420
  • Loading branch information
dominikh committed Jul 6, 2023
1 parent af8c968 commit ddee6bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stylecheck/names.go
Expand Up @@ -114,7 +114,11 @@ func CheckNames(pass *analysis.Pass) (interface{}, error) {
return
}

if code.IsInTest(pass, v) && (strings.HasPrefix(v.Name.Name, "Example") || strings.HasPrefix(v.Name.Name, "Test") || strings.HasPrefix(v.Name.Name, "Benchmark")) {
if code.IsInTest(pass, v) &&
(strings.HasPrefix(v.Name.Name, "Example") ||
strings.HasPrefix(v.Name.Name, "Test") ||
strings.HasPrefix(v.Name.Name, "Benchmark") ||
strings.HasPrefix(v.Name.Name, "Fuzz")) {
return
}

Expand Down

0 comments on commit ddee6bb

Please sign in to comment.