diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-03 02:36:08 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-03 02:36:08 +1200 |
commit | 005bad1031f6e76dd38171296b820643a8f5576c (patch) | |
tree | 5524de49e78f5fe98cdc5bbba71270689fda5edc /vim/compiler | |
parent | Highlight jinja2 files with Django's rules (diff) | |
download | dotfiles-005bad1031f6e76dd38171296b820643a8f5576c.tar.gz dotfiles-005bad1031f6e76dd38171296b820643a8f5576c.zip |
Add checking, tidying, and linting for Python
Diffstat (limited to 'vim/compiler')
-rw-r--r-- | vim/compiler/pyflakes.vim | 9 | ||||
-rw-r--r-- | vim/compiler/pylint.vim | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/vim/compiler/pyflakes.vim b/vim/compiler/pyflakes.vim new file mode 100644 index 00000000..727fbd76 --- /dev/null +++ b/vim/compiler/pyflakes.vim @@ -0,0 +1,9 @@ +" :compiler support for Python syntax checking with pyflakes +" <https://pypi.org/project/pyflakes/> +if exists('current_compiler') || &compatible || !has('patch-7.4.191') + finish +endif +let current_compiler = 'pyflakes' + +CompilerSet makeprg=pyflakes\ %:S +CompilerSet errorformat=%f:%l:%c:\ %m diff --git a/vim/compiler/pylint.vim b/vim/compiler/pylint.vim new file mode 100644 index 00000000..589f78e3 --- /dev/null +++ b/vim/compiler/pylint.vim @@ -0,0 +1,9 @@ +" :compiler support for Python linting with pylint +" <https://pypi.org/project/pyflakes/> +if exists('current_compiler') || &compatible || !has('patch-7.4.191') + finish +endif +let current_compiler = 'pylint' + +CompilerSet makeprg=pylint\ --output-format=parseable\ --score=n\ %:S +CompilerSet errorformat=%f:%l:\ %m |