Expand description
Check the NatSpec
documentation of a source file
The lint
function parsers the source file and contained items, validates them according to the configured
rules and emits a list of diagnostics, grouped by source item.
Structs§
- Diagnostic
- A single diagnostic related to
NatSpec
. - File
Diagnostics - Diagnostics for a single Solidity file
- Item
Diagnostics - Diagnostics for a single source item (function, struct, etc.)
- Item
Diagnostics Builder - Use builder syntax to set the inputs and finish with
build()
. - Validation
Options - Validation options to control which lints generate a diagnostic
- Validation
Options Builder - Use builder syntax to set the inputs and finish with
build()
.
Traits§
- Validate
- A trait implemented by
Definition
to validate the relatedNatSpec
Functions§
- check_
author - Check if the
@author
presence matches the requirements (Req::Required
orReq::Forbidden
) and generate a diagnostic if it doesn’t. - check_
dev - Check if the
@dev
presence matches the requirements (Req::Required
orReq::Forbidden
) and generate a diagnostic if it doesn’t. - check_
notice - Check if the
@notice
presence matches the requirements (Req::Required
orReq::Forbidden
) and generate a diagnostic if it doesn’t. - check_
notice_ and_ dev - Check if the
@notice
or@dev
presence matches the requirements (Req::Required
orReq::Forbidden
) and generate diagnostics if they don’t. - check_
params - Check a list of params to see if they are documented with a corresponding item in the
NatSpec
, and generate a diagnostic for each missing one or if there are more than 1 entry per param. - check_
returns - Check a list of returns to see if they are documented with a corresponding item in the
NatSpec
, and generate a diagnostic for each missing one or if there are more than 1 entry per param. - check_
title - Check if the
@title
presence matches the requirements (Req::Required
orReq::Forbidden
) and generate a diagnostic if it doesn’t. - lint
- Lint a file by identifying
NatSpec
problems.