Module lint

Module lint 

Source
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.
FileDiagnostics
Diagnostics for a single Solidity file
ItemDiagnostics
Diagnostics for a single source item (function, struct, etc.)
ItemDiagnosticsBuilder
Use builder syntax to set the inputs and finish with build().
ValidationOptions
Validation options to control which lints generate a diagnostic
ValidationOptionsBuilder
Use builder syntax to set the inputs and finish with build().

Traits§

Validate
A trait implemented by Definition to validate the related NatSpec

Functions§

check_author
Check if the @author presence matches the requirements (Req::Required or Req::Forbidden) and generate a diagnostic if it doesn’t.
check_dev
Check if the @dev presence matches the requirements (Req::Required or Req::Forbidden) and generate a diagnostic if it doesn’t.
check_notice
Check if the @notice presence matches the requirements (Req::Required or Req::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 or Req::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 or Req::Forbidden) and generate a diagnostic if it doesn’t.
lint
Lint a file by identifying NatSpec problems.