SublimeLinter / SublimeLinter-flake8

SublimeLinter plugin for python, using flake8.
MIT License
184 stars 28 forks source link

Extend "E501 line too long" match till end of line #119

Closed iamkroot closed 3 years ago

iamkroot commented 3 years ago

Currently, positions of lints with E501 are handled by the PythonLinter base class. Since flake8 gives the column (like 80) as the hint, the base class extends the lint to the end of scope. This sometimes gives confusing results, like only outlining a single character (which would suggest that something is wrong with that char, rather than the line): Screenshot_20210710_112257

This doesn't match the semantics of E501 - everything after that column is a part of the warning/error, so the outline should extend till the end of the line. Here's the expected result: Screenshot_20210710_112657

kaste commented 3 years ago

Totally reasonable. Do you want to try a PR?