| Crates.io | natlint |
| lib.rs | natlint |
| version | 0.1.0 |
| created_at | 2025-02-15 19:33:15.159412+00 |
| updated_at | 2025-05-25 14:01:03.42501+00 |
| description | A linter for Solidity natspec comments. |
| homepage | |
| repository | https://github.com/srdtrk/natlint |
| max_upload_size | |
| id | 1557042 |
| size | 402,307 |
Natlint is an open-source tool for linting Solidity natspec comments.
You can install Natlint using Cargo:
cargo install natlint
First initialize a configuration file, if you don't have one:
natlint init
This will create a natlint.toml file in the current directory with the default settings. See the commented config file for more details on the available options.
Then run Natlint with one or more Globs as arguments. For example, to lint all files inside contracts directory, you can do:
natlint run --include 'contracts/**/*.sol'
Run Natlint with the -h option to see all available options.
You can use a natlint.toml file to configure Natlint. You can also specify the path to the configuration file with the --config option.
natlint run --config path/to/natlint.toml -i 'contracts/**/*.sol'
To generate a default configuration file, run:
natlint init
You can use comments in the source code to configure Natlint in a given line.
// natlint-disable-next-line
function foo() public {
// ...
}
/// @notice This function does something important
// natlint-disable-next-line RuleName1,RuleName2
function bar() public {
// ...
}