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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user