andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 39 forks source link

Exception in lint on Windows #325

Closed bjones1 closed 8 years ago

bjones1 commented 8 years ago

Windows has a : in file names, which break's the lint module's parsing. For example, flake8 reports: C:\Users\bjones\Documents\enki_all\enki\enki\plugins\lint\__init__.py:12:80: E501 line too long (89 > 79 characters). Therefore, line 81 of __init__.py, which is filePath, lineNumber, columnNumber, rest = line.split(':', 3), mis-parsers lineNumber as \Users\bjones\Documents\enki_all\enki\enki\plugins\lint\__init__.py, which produces:

CRITICAL:root:Traceback (most recent call last):
  File "C:\Users\bjones\Documents\enki_all\enki\bin\..\enki\plugins\lint\__init__.py", line 62, in run
    results = self._processSync(task.language, task.filePath)
  File "C:\Users\bjones\Documents\enki_all\enki\bin\..\enki\plugins\lint\__init__.py", line 85, in _processSync
    lineIndex = int(lineNumber) - 1
ValueError: invalid literal for int() with base 10: '\\Users\\bjones\\Documents\\enki_all\\enki\\enki\\plugins\\lint\\__init__.py'
andreikop commented 8 years ago

fixed