Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lintcmd: don't print \' in -list-checks and -explain
All the single quotes are written as `\'` in the descriptions. I assume that's for a good reason, but -list-checks would print: % staticcheck -list-checks | grep "'" S1003 Replace call to \'strings.Index\' with \'strings.Contains\' S1004 Replace call to \'bytes.Compare\' with \'bytes.Equal\' S1011 Use a single \'append\' to concatenate two slices S1012 Replace \'time.Now().Sub(x)\' with \'time.Since(x)\' ... % staticcheck -explain S1003 Replace call to \'strings.Index\' with \'strings.Contains\' So fix that: % staticcheck -list-checks | grep "'" S1003 Replace call to 'strings.Index' with 'strings.Contains' S1004 Replace call to 'bytes.Compare' with 'bytes.Equal' S1011 Use a single 'append' to concatenate two slices S1012 Replace 'time.Now().Sub(x)' with 'time.Since(x)' ... % staticcheck -explain S1003 Replace call to 'strings.Index' with 'strings.Contains' As an added bonus, make `-explain s1003` (lower case) work. Seemed too small of a change to make a new PR for.
- Loading branch information