All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
2 Save g:ale_warn_about_trailing_whitespace
4 let g:ale_warn_about_trailing_whitespace = 1
6 runtime ale_linters/python/pylint.vim
11 call ale#linter#Reset()
13 silent file something_else.py
15 Execute(Basic pylint errors should be handle):
21 \ 'text': 'Trailing whitespace',
22 \ 'code': 'trailing-whitespace',
28 \ 'text': 'Missing module docstring',
29 \ 'code': 'missing-docstring',
35 \ 'text': 'Missing function docstring',
36 \ 'code': 'missing-docstring',
42 \ 'text': '''break'' not properly in loop',
43 \ 'code': 'not-in-loop',
49 \ 'text': 'Unreachable code',
50 \ 'code': 'unreachable',
56 \ 'text': 'No exception type(s) specified',
57 \ 'code': 'bare-except',
61 \ ale_linters#python#pylint#Handle(bufnr(''), [
62 \ 'No config file found, using default configuration',
63 \ '************* Module test',
64 \ 'test.py:4:0: C0303 (trailing-whitespace) Trailing whitespace',
65 \ 'test.py:1:0: C0111 (missing-docstring) Missing module docstring',
66 \ 'test.py:2:0: C0111 (missing-docstring) Missing function docstring',
67 \ 'test.py:3:4: E0103 (not-in-loop) ''break'' not properly in loop',
68 \ 'test.py:4:4: W0101 (unreachable) Unreachable code',
69 \ 'test.py:7:32: W0702 (bare-except) No exception type(s) specified',
71 \ '------------------------------------------------------------------',
72 \ 'Your code has been rated at 0.00/10 (previous run: 2.50/10, -2.50)',
75 Execute(Ignoring trailing whitespace messages should work):
76 let g:ale_warn_about_trailing_whitespace = 0
83 \ 'text': 'Missing module docstring',
84 \ 'code': 'missing-docstring',
88 \ ale_linters#python#pylint#Handle(bufnr(''), [
89 \ 'No config file found, using default configuration',
90 \ '************* Module test',
91 \ 'test.py:4:0: C0303 (trailing-whitespace) Trailing whitespace',
92 \ 'test.py:1:0: C0111 (missing-docstring) Missing module docstring',
94 \ '------------------------------------------------------------------',
95 \ 'Your code has been rated at 0.00/10 (previous run: 2.50/10, -2.50)',
98 Execute(The pylint handler should parse Windows filenames):
104 \ 'text': 'Undefined variable ''x''',
105 \ 'code': 'undefined-variable',
109 \ ale_linters#python#pylint#Handle(bufnr(''), [
110 \ '************* Module test',
111 \ 'D:\acm\github\vim\tools\test.py:13:5: E0602 (undefined-variable) Undefined variable ''x''',
113 \ '------------------------------------------------------------------',
114 \ 'Your code has been rated at 5.83/10 (previous run: 5.83/10, +0.00)',
118 let g:ale_python_pylint_use_msg_id = 1
124 \ 'text': 'Undefined variable ''x''',
129 \ ale_linters#python#pylint#Handle(bufnr(''), [
130 \ '************* Module test',
131 \ 'D:\acm\github\vim\tools\test.py:13:5: E0602 (undefined-variable) Undefined variable ''x''',
133 \ '------------------------------------------------------------------',
134 \ 'Your code has been rated at 5.83/10 (previous run: 5.83/10, +0.00)',