← All lints

unknown_lint

L0001Correctnessdeny: cpl lint exits 1

Unknown lint name

with lint or cp.toml names a lint that does not exist

Flagged
with lint(not_a_real_lint: allow)
let x = 1
print(x)
Write instead
with lint(var_never_reassigned: allow)
var x = 1
print(x)

Why

A with lint(...) context or [lints] table entry names a lint that does not exist. Check the spelling against the lint catalog.

The practice it serves

Code that is wrong or almost certainly a bug. Denied by cpl lint. Family: N. Naming and spelling.

Not flagged

A near miss: close to the pattern, but not it.

Near miss
with lint(var_never_reassigned: allow)
var x = 1
print(x)

Turn it off

For one block, wrap it in with lint(unknown_lint: allow):. For a project, add unknown_lint = "allow" under [lints] in cp.toml.

Generated from spec/lints/unknown_lint, the same record the linter is built from.