linter-pylint icon indicating copy to clipboard operation
linter-pylint copied to clipboard

for specific file pylint works but linter-pylint doesn't -- Column start greater than line length

Open mbdevpl opened this issue 6 years ago • 14 comments

The issue I'm having recently is that for a file: https://github.com/mbdevpl/version-query/blob/master/version_query/version.py linter-pylint is always failing, since I installed it not so long ago.

For latest as of now revision https://github.com/mbdevpl/version-query/blob/8289045e7b818aa36a447202cdb3b46d6207c9a1/version_query/version.py the error message reads:

[Linter] Error running Pylint Error: Column start (31) greater than line length (14) for line 37
    at Object.generateRange (/Users/mateusz/.atom/packages/linter-pylint/node_modules/atom-linter/lib/index.js:181)
    at /Users/mateusz/.atom/packages/linter-pylint/node_modules/lazy-req/index.js:22
    at Object.<anonymous> (main.js [sm]:148)
    at Generator.next (<anonymous>)
    at step (/Users/mateusz/.atom/packages/linter-pylint/lib/main.js:7)
    at process._tickCallback (internal/process/next_tick.js:103)
(anonymous) @ linter-registry.js [sm]:137
_tickCallback @ internal/process/next_tick.js:103

However pylint itself works (e.g. on my MacBook):

mbMac:version-query mateusz$ pylint --version
No config file found, using default configuration
pylint 1.7.4, 
astroid 1.5.3
Python 3.6.3 (default, Oct 18 2017, 23:31:34) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)]
mbMac:version-query mateusz$ pylint --msg-template='{line},{column},{category},{msg_id}: {msg}' --reports=n version_query/version.py
No config file found, using default configuration
************* Module version_query.version
260,0,convention,C0326: No space allowed around keyword argument assignment
                t.Tuple[t.Optional[str], t.Optional[str], t.Optional[int]]] = None,
                                                                            ^
38,0,refactor,R0902: Too many instance attributes (8/7)
193,4,convention,C0111: Missing method docstring
197,4,convention,C0111: Missing method docstring
205,18,warning,W0212: Access to a protected member _version of a client class
254,4,convention,C0111: Missing method docstring
277,15,convention,C1801: Do not use `len(SEQUENCE)` as condition value
293,23,convention,C1801: Do not use `len(SEQUENCE)` as condition value
274,8,refactor,R1702: Too many nested blocks (6/5)
257,4,refactor,R0912: Too many branches (22/12)
257,4,refactor,R0915: Too many statements (52/50)
328,4,convention,C0111: Missing method docstring
368,4,convention,C0111: Missing method docstring
385,11,convention,C1801: Do not use `len(SEQUENCE)` as condition value
375,4,refactor,R0912: Too many branches (14/12)
427,4,convention,C0111: Missing method docstring
431,4,convention,C0111: Missing method docstring
462,4,convention,C0111: Missing method docstring
465,4,refactor,R0912: Too many branches (21/12)
540,4,convention,C0111: Missing method docstring
546,4,convention,C0111: Missing method docstring
551,4,convention,C0111: Missing method docstring
555,4,convention,C0111: Missing method docstring
560,4,convention,C0111: Missing method docstring
574,4,convention,C0111: Missing method docstring
580,4,convention,C0111: Missing method docstring
584,4,convention,C0111: Missing method docstring
587,4,convention,C0111: Missing method docstring
590,4,convention,C0111: Missing method docstring
38,31,refactor,R0904: Too many public methods (24/20)

------------------------------------------------------------------
Your code has been rated at 9.24/10 (previous run: 9.24/10, +0.00)

... and further logs showing that pylint works for that file can be found on TravisCI, e.g Python 3.6 on Linux: https://travis-ci.org/mbdevpl/version-query/jobs/294048400#L1154

Similar issues in the past were #2 and #165 - it seems this might not be related to any of them though.

Error always happens for me with linter-pylint 2.1.0 (latest, no updates available) on Mac and Linux.

And BTW, linter-pylint works great for all my other files, I think it's a really useful and good tool overall. What can I do to help fix this one annoying error?

mbdevpl avatar Oct 28 '17 09:10 mbdevpl