Find curated comby
patterns for replacing certain Go patterns in this repo. These patterns aim to:
- generate virtually zero false positives (i.e., every match should be something you can act on improving)
- match/replace code that can be objectively better (i.e., not stylistically controversial)
If you find that a pattern doesn't do this effectively, please file an issue.
go-staticcheck.toml
: a subset of 22 patterns inspired by simple staticcheck patterns.
comby -config go-staticcheck.toml -f .go
finds matchescomby -config go-staticcheck.toml -f .go -i
replaces file contents- You should run
gofmt
after running the above
- You should run
Exclude vendor
and .
directories with:
comby -config go-staticcheck.toml -f .go -i -exclude-dir vendor,.