redline explain

Turn the rule id in a finding into the rule, where it is defined, and who receives it.

Every finding cites a rule id in brackets, such as [core/hardcoded-secrets]. explain prints that rule's text, whether a checker or review judgement decides it, the standards file and line that defines it, the files it applies to, and every profile that receives it. Run it when a finding on your pull request is not clear.

Where it runs: Anywhere, including a directory that was never onboarded. The rules are built into the CLI.

Synopsis

synopsis
redline explain <rule-id> [--json]
redline explain --list

Flags

FlagDefaultWhat it does
--listoffEvery rule id in the standards, with its severity.
--jsonoffThe rule, its scope and the profiles it reaches, as JSON on stdout.

--help prints the same list from the CLI you have installed.

Examples

Explain a finding

terminal
$ pnpm redline explain core/hardcoded-secrets

BLOCKER core/hardcoded-secrets

  No hardcoded secrets, API keys, tokens, or credentials — including in test files, fixtures, config samples, and comments.

  decided by   review judgement
  defined in   standards/core.md:64
  applies to   every file — the core standard is not scoped by stack
  reaches      javascript-typescript, web-react, web-nextjs, …

Find an id you half remember

terminal
$ pnpm redline explain --list | grep secret

Exit codes

CodeMeaning
0Success.
2No rule id given, or no rule with that id. The error points at --list.