w0rp
f03370e183
Merge pull request #2207 from pmacosta/master
...
Fixed parsing of pydocstyle errors
2019-01-27 11:01:14 +00:00
w0rp
d882c434a1
Merge pull request #2215 from irwand/master
...
support older flake8 output, still used by hacking module from openstack style guide
2019-01-27 10:57:42 +00:00
Martino Pilia
0a5de2b42b
Add bandit linter for Python
2019-01-26 11:48:03 +01:00
yut23
f2db164268
Add support for pyls configuration options
...
Resolves #1443 .
Heavily inspired by the analogous support added for elixir-ls.
2019-01-20 23:59:46 -05:00
Irwan Djajadi
08affaad7a
support older flake8 output, still used by hacking module from open style guide
2019-01-16 10:59:05 -06:00
Pablo Acosta-Serafini
86af4be0d0
Fixed parsing of pydocstyle errors
...
ale#Escape function seems to prepend and append ' to the file name, which
are not present in the pydocstyle output. Having the parsing regexp match
the file name was overkill anyway, since there is an obvious 1:1
correspondence between the buffer number and the (potential) errors
reported by pydocstyle.
2019-01-14 20:36:14 -05:00
pmacosta
fdd37acc1f
Add support for pydocstyle linter ( #2085 )
...
The linter can correctly parse pydocstyle output with any of the following
command-line options enabled: --explain, --source, --debug, and/or
--verbose
2018-12-06 11:27:03 -07:00
Marius Gedminas
9481f307fb
flake8 reports visual columns
...
Fixes #2092 .
2018-11-22 11:57:02 +02:00
Eddie Lebow
dbe9352935
Add python_auto_pipenv
config var for all python linters.
...
This allows a user to set one variable instead of eight.
2018-09-15 22:10:46 -04:00
Eddie Lebow
56e67c5811
Add python_[linter]_auto_pipenv options for python linters ( fixes #1656 )
...
When set to true, and the buffer is currently inside a pipenv,
GetExecutable will return "pipenv", which will trigger the existing
functionality to append the correct pipenv arguments to run each linter.
Defaults to false.
I was going to implement ale#python#PipenvPresent by invoking
`pipenv --venv` or `pipenv --where`, but it seemed to be abominably
slow, even to the point where the test suite wasn't even finishing
("Tried to run tests 3 times"). The diff is:
diff --git a/autoload/ale/python.vim b/autoload/ale/python.vim
index 7baae079..8c100d41 100644
--- a/autoload/ale/python.vim
+++ b/autoload/ale/python.vim
@@ -106,5 +106,9 @@ endfunction
" Detects whether a pipenv environment is present.
function! ale#python#PipenvPresent(buffer) abort
- return findfile('Pipfile.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
+ let l:cd_string = ale#path#BufferCdString(a:buffer)
+ let l:output = systemlist(l:cd_string . 'pipenv --where')[0]
+ " `pipenv --where` returns the path to the dir containing the Pipfile
+ " if in a pipenv, or some error text otherwise.
+ return strpart(l:output, 0, 18) !=# "No Pipfile present"
endfunction
Using vim's `findfile` is much faster, behaves correctly in the majority
of situations, and also works reliably when the `pipenv` command doesn't
exist.
2018-09-15 22:10:46 -04:00
actionless
eb38c4b3f1
fix(linters: python): mark as lint_file
2018-07-26 14:45:28 +02:00
Yauhen Kirylau
8517e901ff
Add support for 'vulture' for Python
2018-07-26 08:41:27 +01:00
w0rp
9ddf1b6a05
Make the language option for LSP linters optional
2018-07-04 13:12:58 +01:00
w0rp
db85b931ec
Remove deprecated code for the 2.0 release
2018-07-04 08:36:34 +01:00
Derek P Sifford
ea6d720fec
add pyre lsp linter to python linters
2018-07-01 14:59:49 -04:00
w0rp
b047271051
Merge pull request #1682 from fennerm/fix_prospector_e474
...
Fix prospector empty string error
2018-06-27 21:34:28 +01:00
Fenner Macrae
1ca2334846
Fix prospector empty string error
...
Prospector linter is raising error when no warnings are present in file
(#1680 ). Copied fix from #779 .
2018-06-26 16:58:34 -07:00
Eddie Lebow
ca88e67af0
Allow all Python linter executables to be set to pipenv
.
...
It appends ` run {linter_name}`, analogously to the Ruby linters when
the executable is set to `bundle`
2018-06-05 00:33:26 -04:00
Eddie Lebow
dd642b117c
Allow flake8 executable to be set to pipenv
.
...
It appends ` run flake8`, analogously to the Ruby tools when the
executable is set to `bundle`
2018-06-02 21:49:12 -04:00
w0rp
191967cfee
#1587 - Add deprecation warnings for old linter options
2018-05-28 19:52:27 +01:00
w0rp
8a659b7cc6
Fix #1566 - Add g:ale_python_flake8_change_directory
2018-05-28 16:34:54 +01:00
w0rp
6ab3fdc4d0
Close #1521 - Allow the language to be set with simple strings for LSP linters
2018-04-27 22:52:11 +01:00
Andreas Kloeckner
603e61ad71
flake8: Move to the buffer's directory before running flake8 command
2018-04-26 18:53:44 -05:00
w0rp
d8a673515a
Close #1162 - Implement completion support with LSP servers
2018-04-22 12:28:19 +01:00
w0rp
f9ba3d924f
Fix #1507 - Add an option for disabling switching directories for pylint
2018-04-17 13:30:30 +01:00
w0rp
3f0e1cd05d
Fix #1492 - Make pylint error parsing work on Windows
2018-04-10 15:18:16 +01:00
w0rp
719b790574
Close #542 - Add an option for disabling running locally installed executables by default
2018-04-09 19:11:20 +01:00
rhysd
4903b966a7
pylint: Move to the buffer's directory before running pylint command ( Fix #1472 )
2018-04-09 16:43:10 +09:00
w0rp
5972b97223
#476 Make F401 a warning and E112 a syntax error
2018-02-18 09:44:04 +00:00
w0rp
adba2bd919
Allow syntax errors for mypy to be ignored
2018-01-11 16:43:10 +00:00
Carlos Coêlho
daee4a4722
Add prospector for checking Python code ( #1183 )
2017-12-01 17:04:30 +00:00
w0rp
a43ada93e4
Allow warnings about trailing whitespace to be disabled for pycodestyle, and cover the flake8 code with tests
2017-11-28 10:12:49 +00:00
w0rp
0ab689db0a
Allow warnings about trailing blank lines to be hidden for flake8 and pycodestyle
2017-11-28 10:08:34 +00:00
w0rp
52f3ad7c75
Escape the pyls executable in the command, and support running virtualenv pyls executables
2017-11-21 23:51:18 +00:00
w0rp
49ccfb1a00
Fix #516 - Add support for pyflakes for Python
2017-11-17 18:11:28 +00:00
w0rp
1d65e5692f
#852 Capture error codes for pycodestyle, and consider every code except E999 to be style errors or warnings
2017-11-15 17:47:24 +00:00
w0rp
cf538c3a58
#852 Capture error codes for pylint, throw away the msgid values
2017-11-15 17:35:34 +00:00
w0rp
d8f9aef84a
#852 - Capture error codes for flake8
2017-11-14 09:41:29 +00:00
w0rp
d425b8a18a
Simplfy semver handling and share the semver version cache across everything
2017-11-09 23:42:54 +00:00
Auri
8a4cf923a8
Add PyLS linter ( #1097 )
...
* Support PyLS (python language server)
* Replace pyls#GetProjectRoot and add more config types to ale#python#FindProjectRoot
2017-11-08 17:58:56 +00:00
Michael
8f8d015dae
Add pycodestyle Python linter support ( #872 )
...
Add a pycodestyle linter
2017-08-25 12:46:56 +01:00
w0rp
cc02eb8a5a
#653 Show errors from other files for mypy
2017-08-20 17:43:42 +01:00
w0rp
d5ae3201a4
Ban !=# and !=? from the codebase
2017-08-11 00:31:42 +01:00
w0rp
b9f31621e4
Move --format=default in the flake8 command to the return value, and remove extra spaces in the tests
2017-08-10 09:58:32 +01:00
Matthew Grossman
fe95fcd357
Default flake8 to --format=default
2017-08-09 10:05:56 -07:00
w0rp
a535d07f28
Ban use of ==# or ==? in the codebase, and prefer is# or is? instead
2017-08-08 08:39:13 +01:00
w0rp
a04e73ddbc
#729 - Support running Python programs from virtualenv for Windows
2017-07-05 13:07:55 +01:00
Nick Krichevsky
14cca6d115
Remove style classification from E999 ( #696 )
...
* Remove style classification from E999
* Update test_flake8_handler to reflect E999 changes
2017-06-27 15:07:26 +01:00
w0rp
16ba9bd680
Fix #680 - Use --shadow-file to check for problems with mypy while you type
2017-06-27 10:06:03 +01:00
John Sivak
539a76c5ae
Change regex to better handle messages with multiple groups of parentheses.
2017-06-25 20:19:39 -04:00