1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

refactor: enable gocritic linter; fix lint issues (#1375)

This commit is contained in:
Oleksandr Redko
2025-05-26 12:40:17 +03:00
committed by GitHub
parent 51ac5c2524
commit e8ed573739
17 changed files with 79 additions and 70 deletions

View File

@@ -197,7 +197,7 @@ func parseInstructions(t *testing.T, filename string, src []byte) []instruction
if i := strings.Index(line, "MATCH:"); i >= 0 {
// This is a match for a different line.
lns := strings.TrimPrefix(line[i:], "MATCH:")
lns = lns[:strings.Index(lns, " ")]
lns = lns[:strings.Index(lns, " ")] //nolint:gocritic // offBy1: false positive
matchLine, err = strconv.Atoi(lns)
if err != nil {
t.Fatalf("Bad match line number %q at %v:%d: %v", lns, filename, ln, err)