Skip to content

Latest commit

 

History

History

linting

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ink! linting rules

This crate uses dylint to define custom linting rules for ink!.

It is not part of the workspace because it needs a custom linker to be built.

The lints are written against a fixed toolchain version because they are using unstable APIs. This is why we have a toolchain file here.

This crate contains two libraries:

  • mandatory lints are integrated into the ink! smart contracts' build process, adding custom compilation errors to cargo-build.
  • extra lints are designed to check for secure coding style in smart contracts and highlight potential issues. These are optional and intended for use by the contract developer to improve the security properties of their project.

You can use them by running cargo dylint after adding this to your Cargo.toml:

[workspace.metadata.dylint]
libraries = [
    { git = "https://github.com/use-ink/ink.git", pattern = "linting/mandatory" },
    { git = "https://github.com/use-ink/ink.git", pattern = "linting/extra" },
]