natlint

Crates.ionatlint
lib.rsnatlint
version0.1.0
created_at2025-02-15 19:33:15.159412+00
updated_at2025-05-25 14:01:03.42501+00
descriptionA linter for Solidity natspec comments.
homepage
repositoryhttps://github.com/srdtrk/natlint
max_upload_size
id1557042
size402,307
(srdtrk)

documentation

README

natlint

Natlint is an open-source tool for linting Solidity natspec comments.

Installation

You can install Natlint using Cargo:

cargo install natlint

Usage

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.

Configuration

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

Inline Configuration

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 {
    // ...
}
Commit count: 41

cargo fmt