Documentation
¶
Overview ¶
Command ratchet holds the linters in golangci.yml to a shrink-only allowlist. allowlist.json maps each linter to the files that broke it when it landed, with the number of problems in each. The command fails when:
- a file has more problems than its entry allows, or a file without an entry has any;
- a file has fewer problems than its entry, so the entry must go down (delete it at 0);
- the allowlist grew against the base ref: a new entry or a higher count;
- a nolint comment hides gocognit. The fix for a complex function is to split it.
Run it from the repo root: go run ./scripts/ratchet [-base origin/develop]
Click to show internal directories.
Click to hide internal directories.