-
Notifications
You must be signed in to change notification settings - Fork 45
Error: Column start (16) greater than line length (15) #256
Comments
Yup. Very annoying. Confirm. |
Same thing for me |
For any others that find this issue, I implore you to use the 👍 reaction on the original issue, instead of commenting - comments send emails to everyone on the chain and have little value. If you have further debug/fix details, please do comment with them. |
I have found a decent workaround that will suppress the error and allow linter-flake8 to function without any negative side effects. Open file: .atom\packages\linter-flake8\node_modules\atom-linter\lib\index.js and scroll down to line # 178 Replace:
With:
Before applying this workaround I was constantly being spammed with the error message discussed in the first post and linter-flake8 would not function at all. However, after applying the aforementioned changes to index.js, I am now using linter-flake8 without any issues. Disclaimer: This is, at best, a cheap hack to keep things glued together until the project developers are able to update the plugin with a proper fix. |
Thanks @michaelhx . Your little trick work for me. |
Can anyone getting this error please post a file that reproduces it? This message is due to a bug in @michaelhx That is only going to work if |
I'll push out a bugfix release that shows the original message, which will help with comparing to the |
v2.0.1 will show details of the original message in the developer tools so we can trace down where the bug is occurring. If you see this please either post the file you are seeing this on and I will trace where the issue is, or follow these steps yourself:
|
@Arcanemagus thanks for producing a debug build so swiftly! I was able to reproduce the error and narrowed it down to this foo( Basically, a broken syntax file. Devtools shows:
flake8 on this file produces: $ flake8 broken.py
broken.py:1:1: E902 TokenError: EOF in multi-line statement
broken.py:1:6: E999 SyntaxError: unexpected EOF while parsing So it's clear that the file is broken, and flake8 is reporting it as such, but it's not being caught/reported correctly by the linter. If you need more details, please let me know, I'm happy to help! |
Thanks, this would be a bug in Edit: Reported as https://gitlab.com/pycqa/flake8/issues/237. |
As we are already fixing some of the ranges here I'm breaking a personal policy of mine and putting in a temporary workaround till this can be resolved in |
I think the problem here is specifically "unexpected EOF" errors, rather than all syntax errors. In that case flake8 reports a location at the point where it encountered the EOF, which is not a valid position in Atom. This error seems to be a regression in linter-flake8 2.0, previous versions did not report this error with the same flake8 version. |
@wichert It's not a regression, but rather a fix to the detection of these invalid points. It should have been throwing this the entire time. Are there other E999 errors that this workaround may cause issues for? |
Pushed out v2.0.2 with the workaround. |
@Arcanemagus Thanks for the fix! I have to disagree with you on this not being a regression: from a users perspective the pre-2.0 releases worked fine, but immediately after upgrading to 2.0 I started getting what feels like a half dozen error messages on every new line of code I am typing, making the plugin entirely unusable. I've had to disable it everywhere so I could keep working. |
The fix from #262 is incomplete: the same problem happens with other errors. For example E901:
x.py only has 9 characters (including the newline), not 10. I would not be surprised if this happens for other errors as well. |
Just awesome, you would think a linter meant to check code validity would have tests for things like this... |
Currently the E999 error seems to always report 2 colums farther than it should, force it to be 2 less to fit within the valid range. See https://gitlab.com/pycqa/flake8/issues/237 for more details.
Error still happening for me with 2.0.2. |
As an FYI I plan on implementing the same system outlined in AtomLinter/linter-eslint#735 (comment) here, so these messages will instead show as a "linter message", with the additional details being printed to the console. |
Would a suitable workaround be to implement a check |
It seems to have been fixed in flake8 3.1.0: https://gitlab.com/pycqa/flake8/issues/237 I upgraded to 3.2.0 and I'm not getting the error anymore. |
Marking this as closed since this specific issue has been fixed in |
v2.1.0 has been released which moves the error reporting to a Linter message. |
Using linter-flake8 2.0.0
The text was updated successfully, but these errors were encountered: