crates/lint/docs/README.md
This directory contains one markdown file per registered forge-lint rule. Each file is referenced
by the lint's help URL (https://getfoundry.sh/forge/linting/<id>) and is consumed by the
Foundry book to render the lint reference page.
When you add a new lint with declare_forge_lint!, you must also add a documentation file at
crates/lint/docs/<str_id>.md. The registered_lints_have_docs unit test in
crates/lint/src/sol/mod.rs enforces the file's presence, registered ID and
severity, and required section order.
Use _template.md as a starting point.
Each lint doc file should follow this structure:
# <human-readable lint name>
**Severity**: `<High | Med | Low | Info | Gas | CodeSize>`
**ID**: `<str_id>`
A one-paragraph description of what this lint detects and why it matters.
## What it does
Explain precisely what the lint flags.
## Why is this bad?
Explain the impact (security, correctness, gas, readability).
## Example
### Bad
```solidity
// triggering example
// non-triggering, recommended example
Document any inline-config or foundry.toml options that affect this lint. Omit this section when
the lint has no additional configuration.