@@ -36,24 +36,26 @@ var replacePatterns = []replacePattern{
36
36
{`^TLS InsecureSkipVerify set true.$` , "TLS `InsecureSkipVerify` set true." },
37
37
38
38
// gosimple
39
- {`^ should replace loop with (.*)$` , "should replace loop with `${1}`" },
40
- {`^ should use a simple channel send/receive instead of select with a single case` ,
39
+ {`should replace loop with (.*)$` , "should replace loop with `${1}`" },
40
+ {`should use a simple channel send/receive instead of select with a single case` ,
41
41
"should use a simple channel send/receive instead of `select` with a single case" },
42
- {`^ should omit comparison to bool constant, can be simplified to (.+)$` ,
42
+ {`should omit comparison to bool constant, can be simplified to (.+)$` ,
43
43
"should omit comparison to bool constant, can be simplified to `${1}`" },
44
- {`^should write (.+) instead of (.+)$` , "should write `${1}` instead of `${2}`" },
45
- {`^redundant return statement$` , "redundant `return` statement" },
44
+ {`should write (.+) instead of (.+)$` , "should write `${1}` instead of `${2}`" },
45
+ {`redundant return statement$` , "redundant `return` statement" },
46
+ {`should replace this if statement with an unconditional strings.TrimPrefix` ,
47
+ "should replace this `if` statement with an unconditional `strings.TrimPrefix`" },
46
48
47
49
// staticcheck
48
- {`^ this value of (\S+) is never used$` , "this value of `${1}` is never used" },
49
- {`^ should use time.Since instead of time.Now\(\).Sub$` ,
50
+ {`this value of (\S+) is never used$` , "this value of `${1}` is never used" },
51
+ {`should use time.Since instead of time.Now\(\).Sub$` ,
50
52
"should use `time.Since` instead of `time.Now().Sub`" },
51
- {`^ should check returned error before deferring response.Close\(\)$` ,
53
+ {`should check returned error before deferring response.Close\(\)$` ,
52
54
"should check returned error before deferring `response.Close()`" },
53
- {`^ no value of type uint is less than 0$` , "no value of type `uint` is less than `0`" },
55
+ {`no value of type uint is less than 0$` , "no value of type `uint` is less than `0`" },
54
56
55
57
// unused
56
- {`^ (func|const|field|type|var) (\S+) is unused$` , "${1} `${2}` is unused" },
58
+ {`(func|const|field|type|var) (\S+) is unused$` , "${1} `${2}` is unused" },
57
59
58
60
// typecheck
59
61
{`^unknown field (\S+) in struct literal$` , "unknown field `${1}` in struct literal" },
0 commit comments