Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.soliumignore doesn't ignore files/dirs listed #287

Open
seanoh1989 opened this issue Dec 12, 2020 · 0 comments
Open

.soliumignore doesn't ignore files/dirs listed #287

seanoh1989 opened this issue Dec 12, 2020 · 0 comments
Labels

Comments

@seanoh1989
Copy link

Description
I have setup ethlint with ethlint --init and made sure .soliumignore has been created.
Currently it has

node_modules
src/contracts/Migrations.sol

However, when I run solium -d ., it detects ALL kinds of errors from files in node_modules.
It also does not ignore the default Migrations.sol file I have with 2 spaces as indents.

Example

solium -d src\contracts

src\contracts\Migrations.sol
  5:2     error    Only use indent of 4 spaces.    indentation
  6:2     error    Only use indent of 4 spaces.    indentation
  8:2     error    Only use indent of 4 spaces.    indentation
  10:6    error    Only use indent of 8 spaces.    indentation
  11:6    error    Only use indent of 8 spaces.    indentation
  14:0    error    Only use indent of 4 spaces.    indentation
  16:2    error    Only use indent of 4 spaces.    indentation
  18:0    error    Only use indent of 4 spaces.    indentation

Steps to reproduce

  • The command you used to lint
solium -d .
  • The solidity code over which you ran the linter
  1. Files in node_modules
  2. Migrations.sol generated by Truffle
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.8.0;

contract Migrations {
    address public owner = msg.sender;
    uint public last_completed_migration;

    modifier restricted() {
        require(
            msg.sender == owner,
            "This function is restricted to the contract's owner"
        );
        _;
    }

    function setCompleted(uint completed) public restricted {
        last_completed_migration = completed;
    }
}
  • Contents of your .soliumrc.json file
{
  "extends": "solium:all",
  "plugins": ["security"],
  "rules": {
    "arg-overflow": "off",
    "blank-lines": "off",
    "error-reason": "off",
    "indentation": ["error", 4],
    "lbrace": "off",
    "linebreak-style": ["error", "unix"],
    "max-len": ["error", 120],
    "no-constant": ["error"],
    "no-empty-blocks": "off",
    "quotes": ["error", "double"],
    "uppercase": "off",
    "visibility-first": "error",

    "security/enforce-explicit-visibility": ["error"],
    "security/no-block-members": ["warning"],
    "security/no-inline-assembly": ["warning"]
  }
}
  • Contents of your .soliumignore
node_modules
src/contracts/Migrations.sol

Expected behavior
It should ignore all files and directories listed in .soliumignore

Operating System
Windows 10

Linter version

Solium version 1.2.5

Comments
I changed .soliumignore to have src\contracts\Migrations.sol just in case (since Windows uses \ instead of /), but it doesn't work either.

Priority
High - I really want to be able to run this often, without specifying files I worked on.

@seanoh1989 seanoh1989 added the bug label Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant