solhint
solhint copied to clipboard
Solhint is an open-source project to provide a linting utility for Solidity code.
Requesting a new rule and to enable it by default. `natspec-documentation` The following would trigger an error: - A `public` or `external` function which does not have a NatSpec comment...
When creating a free function (a function outside of a contract) I get the following error: Linter: **Explicitly mark visibility in function [func-visibility** But as explained [here](https://blog.soliditylang.org/2020/09/02/solidity-0.7.1-release-announcement/#:%7E:text=A%20free%20function%20behaves%20like,and%20in%20this%20case%2C%20msg.) > "Free functions...
Hello! I'm migrating from ethlint and found the same issue that I [reported there](https://github.com/duaraghav8/Ethlint/issues/264) some time ago :) In an inherited contract, the constructor often just calls the base constructor,...
Reproduction: ```solidity pragma solidity ^0.4.0; contract Foo {} ``` ``` { "rules": { "compiler-version": "error" } } ``` ## Expected Use default value for the compiler version (`^0.5.8`) ## Result...
> To ignore files that do not require validation you can use a `.solhintignore` file. It supports rules in the `.gitignore` format. The pattern to ignore a dir excluding specific...
It could be great to show that a function parameter declaration shadows an existing state declaration
Like `constant` state vars I also like to `snake-case` my `immutable` state vars because it makes it easier to spot in my code where I am relying on immutable values....
Solhint does not seem to be working correctly when I lint from the command line. Installed via brew and linted with `solhint test.sol`. Solhint version 3.3.6 OSX Monterey Apple M1...
```solidity payable(owner()).transfer(msg.value); ``` This would result in ``` 16:16 error Expected indentation of 8 spaces but found 15 indent ```