feat(forge lint): disable lints with inline comment
ref:
- https://github.com/foundry-rs/foundry/issues/10769#issuecomment-2969023736
Motivation
easily allow disabling lints with inline-config via comments
Implementation
having standardization in mind, i decided to follow the same naming convention as forge-fmt (and borrowed some code from https://github.com/foundry-rs/foundry/blob/dani/fmt-solar/crates/fmt-2/src/inline_config.rs)
because of that, these are the available config options:
forgelint: disable-next-itemforgelint: disable-lineforgelint: disable-next-lineforgelint: disable-startforgelint: disable-end
unlike when formatting though, devs can also inform the target lints by wrapping their ids in parentheses:
forgelint: disable-next-line(asm-keccak256)forgelint: disable-next-line(asm-keccak256, mixed-case-variable)
if no lint ids are provided (or "all" is used), all lints will be disabled:
forgelint: disable-next-line(all)forgelint: disable-next-line
having standardization in mind, i decided to follow the same naming convention as
forge-fmt
Good call 👍
having standardization in mind, i decided to follow the same naming convention as
forge-fmtGood call 👍
let's keep the same name style as for forge-fmt, that is forge-lint?