maralla / validator.vim

Check syntax on the fly asynchronously.
MIT License
213 stars 14 forks source link

Only work with flake8 on python file #75

Closed ghost closed 7 years ago

ghost commented 7 years ago

Somehow it only works with fake8 even I installed other checkers via pip (python file).
let g:validator_python_checkers = ['pylint', 'pyflakes', 'pycodestyle', 'pydocstyle']

ghost commented 7 years ago

This is output of debug:

2017-10-16 04:05:24,310 [WARNING] flake8 not exist 2017-10-16 04:05:24,310 [WARNING] flake8 not exist 2017-10-16 04:10:58,300 [INFO] parse input = [<lints.python.pyflakes.PyFlakes object at 0x0000027DD0B24D30>, ["C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:12:18: F821 undefined name 'raw_input'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:13:5: F821 undefined name 'fsdfs'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:13:10: W291 trailing whitespace', "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:14:5: F821 undefined name 'fsjfs'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:15:17: F821 undefined name 'fsfds'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:16:5: F821 undefined name 'abcd'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:17:5: F821 undefined name 'abcf'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:18:5: F821 undefined name 'abcl'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:19:5: F821 undefined name 'abcl'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:21:13: F821 undefined name 'roll_baba'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:23:1: F821 undefined name 'roll_dfadfd'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:27:1: E302 expected 2 blank lines, found 1', "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:34:5: F821 undefined name 'pas'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:38:1: E303 too many blank lines (3)', "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:42:8: F821 undefined name 'sys'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:53:1: W391 blank line at end of file'], 1] 2017-10-16 04:10:58,300 [INFO] parse input = [<lints.python.pyflakes.PyFlakes object at 0x0000027DD0B24D30>, ["C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:12:18: F821 undefined name 'raw_input'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:13:5: F821 undefined name 'fsdfs'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:13:10: W291 trailing whitespace', "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:14:5: F821 undefined name 'fsjfs'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:15:17: F821 undefined name 'fsfds'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:16:5: F821 undefined name 'abcd'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:17:5: F821 undefined name 'abcf'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:18:5: F821 undefined name 'abcl'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:19:5: F821 undefined name 'abcl'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:21:13: F821 undefined name 'roll_baba'", "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:23:1: F821 undefined name 'roll_dfadfd'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:27:1: E302 expected 2 blank lines, found 1', "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:34:5: F821 undefined name 'pas'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:38:1: E303 too many blank lines (3)', "C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:42:8: F821 undefined name 'sys'", 'C:\Users\crux\AppData\Local\Temp\tempVIA9505.tmp.py:53:1: W391 blank line at end of file'], 1] 2017-10-16 04:10:58,304 [INFO] parsed lists = [{'lnum': '12', 'col': '18', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'raw_input'", 'enum': 1, 'bufnr': 1, 'type': 'W'}, {'lnum': '13', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'fsdfs'", 'enum': 2, 'bufnr': 1, 'type': 'W'}, {'lnum': '13', 'col': '10', 'error': None, 'warning': 'W291', 'text': '[flake8]trailing whitespace', 'enum': 3, 'bufnr': 1, 'type': 'W'}, {'lnum': '14', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'fsjfs'", 'enum': 4, 'bufnr': 1, 'type': 'W'}, {'lnum': '15', 'col': '17', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'fsfds'", 'enum': 5, 'bufnr': 1, 'type': 'W'}, {'lnum': '16', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcd'", 'enum': 6, 'bufnr': 1, 'type': 'W'}, {'lnum': '17', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcf'", 'enum': 7, 'bufnr': 1, 'type': 'W'}, {'lnum': '18', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcl'", 'enum': 8, 'bufnr': 1, 'type': 'W'}, {'lnum': '19', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcl'", 'enum': 9, 'bufnr': 1, 'type': 'W'}, {'lnum': '21', 'col': '13', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'roll_baba'", 'enum': 10, 'bufnr': 1, 'type': 'W'}, {'lnum': '23', 'col': '1', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'roll_dfadfd'", 'enum': 11, 'bufnr': 1, 'type': 'W'}, {'lnum': '27', 'col': '1', 'error': None, 'warning': 'E302', 'text': '[flake8]expected 2 blank lines, found 1', 'enum': 12, 'bufnr': 1, 'type': 'W'}, {'lnum': '34', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'pas'", 'enum': 13, 'bufnr': 1, 'type': 'W'}, {'lnum': '38', 'col': '1', 'error': None, 'warning': 'E303', 'text': '[flake8]too many blank lines (3)', 'enum': 14, 'bufnr': 1, 'type': 'W'}, {'lnum': '42', 'col': '8', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'sys'", 'enum': 15, 'bufnr': 1, 'type': 'W'}, {'lnum': '53', 'col': '1', 'error': None, 'warning': 'W391', 'text': '[flake8]blank line at end of file', 'enum': 16, 'bufnr': 1, 'type': 'W'}] 2017-10-16 04:10:58,304 [INFO] parsed lists = [{'lnum': '12', 'col': '18', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'raw_input'", 'enum': 1, 'bufnr': 1, 'type': 'W'}, {'lnum': '13', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'fsdfs'", 'enum': 2, 'bufnr': 1, 'type': 'W'}, {'lnum': '13', 'col': '10', 'error': None, 'warning': 'W291', 'text': '[flake8]trailing whitespace', 'enum': 3, 'bufnr': 1, 'type': 'W'}, {'lnum': '14', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'fsjfs'", 'enum': 4, 'bufnr': 1, 'type': 'W'}, {'lnum': '15', 'col': '17', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'fsfds'", 'enum': 5, 'bufnr': 1, 'type': 'W'}, {'lnum': '16', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcd'", 'enum': 6, 'bufnr': 1, 'type': 'W'}, {'lnum': '17', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcf'", 'enum': 7, 'bufnr': 1, 'type': 'W'}, {'lnum': '18', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcl'", 'enum': 8, 'bufnr': 1, 'type': 'W'}, {'lnum': '19', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'abcl'", 'enum': 9, 'bufnr': 1, 'type': 'W'}, {'lnum': '21', 'col': '13', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'roll_baba'", 'enum': 10, 'bufnr': 1, 'type': 'W'}, {'lnum': '23', 'col': '1', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'roll_dfadfd'", 'enum': 11, 'bufnr': 1, 'type': 'W'}, {'lnum': '27', 'col': '1', 'error': None, 'warning': 'E302', 'text': '[flake8]expected 2 blank lines, found 1', 'enum': 12, 'bufnr': 1, 'type': 'W'}, {'lnum': '34', 'col': '5', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'pas'", 'enum': 13, 'bufnr': 1, 'type': 'W'}, {'lnum': '38', 'col': '1', 'error': None, 'warning': 'E303', 'text': '[flake8]too many blank lines (3)', 'enum': 14, 'bufnr': 1, 'type': 'W'}, {'lnum': '42', 'col': '8', 'error': None, 'warning': 'F821', 'text': "[flake8]undefined name 'sys'", 'enum': 15, 'bufnr': 1, 'type': 'W'}, {'lnum': '53', 'col': '1', 'error': None, 'warning': 'W391', 'text': '[flake8]blank line at end of file', 'enum': 16, 'bufnr': 1, 'type': 'W'}] 2017-10-16 04:12:11,827 [WARNING] vint not exist 2017-10-16 04:12:11,827 [WARNING] vint not exist 2017-10-16 04:12:11,827 [WARNING] vimlparser not exist 2017-10-16 04:12:11,827 [WARNING] vimlparser not exist

Gvim on windows 8.0.
There's also no underline highlight for warnings and errors.

maralla commented 7 years ago

Well currently python implementation contains only flake8.

ghost commented 7 years ago

Will we have more other linters will be added in near future?

maralla commented 7 years ago

Yes I will find some time to add the linters.