Martin Tournoij
Martin Tournoij
[Their tests](https://github.com/matomo-org/device-detector/blob/master/Tests/fixtures/bots.yml); looks looks like they just use this [list of regexps](https://github.com/matomo-org/device-detector/blob/master/regexes/bots.yml) based on [Bot.php](https://github.com/matomo-org/device-detector/blob/master/Parser/Bot.php).
Add a new checker to flag cases where a deferred function returns exactly one function, and that function isn't called. For example: func f() func() { // Do stuff. return...
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...
Flag all stdlib functions that have both a Printf() and Print() variant. Found with: % rg -g '!internal/' -g '!cmd/' '^func ([()*a-zA-Z0-9_ ]+)?[A-Z]\w+\(\w+ string, \w+ \.\.\.any\)' (will need to filter...
This generally makes code less clear; e.g. the "fixed" version for the added test would be: if strings.HasPrefix(data, "\xff\xfe") { data = data[2:] } else { data = strings.TrimPrefix("\xef\xbb\xbf") }...
This aligns the output of structlayout. To my eyes at least, this is a lot more readable, including more readable than the structlayout-pretty output. Before: % structlayout bufio Reader column.name...
Only skip if both branches are documented; in cases where just one is commented it can just be: // Comment it. return [..] Closes: gh-704 Closes: gh-1488
In the case of compound operators such as +=, -=, etc we need to use the left-hand side to get the value. For IncDec we need a different codepath from...
Fixes #793