ratchet

command
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: GPL-2.0 Imports: 12 Imported by: 0

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:

  1. a file has more problems than its entry allows, or a file without an entry has any;
  2. a file has fewer problems than its entry, so the entry must go down (delete it at 0);
  3. the allowlist grew against the base ref: a new entry or a higher count;
  4. 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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL