SublimeLinter-flake8: ignore "line too long"

I want to ignore “line too long” messages but for some reason it doenst work. This is from my SublimeLinter.sublime-settings:

"flake8": {
    "@disable": false,
    "args": [],
    "builtins": "",
    "excludes": [],
    "ignore": "E501",
    "jobs": "1",
    "max-complexity": -1,
    "max-line-length": null,
    "select": ""
},

The error code E501 is correct (I think) - if I enable debug mode and open the console:

script.py:26:80: E501 line too long (97 > 79 characters)

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 4
  • Comments: 26 (12 by maintainers)

Most upvoted comments

it’s worth noting that this did solution does not work on the latest sublime and packages, and the solution is now this:

// SublimeLinter Settings - User
{
    "lint_mode": "load_save",
    "linters": {
        "flake8": {
            "args": ["--ignore=E501,E127,E128,W191"],
        }
    }
}

as detailed in the thread here:

https://github.com/SublimeLinter/SublimeLinter/issues/1050

I bumped into the same issue today with SublimeLinter 4.0.2, and this seems to work fine:

"flake8": {
    "args": ["--ignore", "E501"]
}

Well, it’s args not args:

This also seems to work -

// SublimeLinter Settings - User
{
    "linters": {
      "flake8": {
            "args": ["--max-line-length=99"],
        }
    }
}

@sambarluc we have a validation mechanism for most settings, but linter plugins can define any additional setting they want. So, for all SublimeLinter knows “args:” is a valid setting for SL-flake8. I can imagine mechanisms that would catch such errors, but the trade off would be a hit in flexibility and probably quite a few lines of code.