Merge pull request #237 from keith/ks/mypy-linter
Add python mypy support
This commit is contained in:
commit
35bdd6f478
@ -76,7 +76,7 @@ name. That seems to be the fairest way to arrange this table.
|
||||
| PHP | [hack](http://hacklang.org/), [php -l](https://secure.php.net/), [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) |
|
||||
| Pug | [pug-lint](https://github.com/pugjs/pug-lint) |
|
||||
| Puppet | [puppet](https://puppet.com), [puppet-lint](https://puppet-lint.com) |
|
||||
| Python | [flake8](http://flake8.pycqa.org/en/latest/), [pylint](https://www.pylint.org/) |
|
||||
| Python | [flake8](http://flake8.pycqa.org/en/latest/), [pylint](https://www.pylint.org/), [mypy](http://mypy-lang.org/) |
|
||||
| Ruby | [rubocop](https://github.com/bbatsov/rubocop) |
|
||||
| SASS | [sass-lint](https://www.npmjs.com/package/sass-lint), [stylelint](https://github.com/stylelint/stylelint) |
|
||||
| SCSS | [sass-lint](https://www.npmjs.com/package/sass-lint), [scss-lint](https://github.com/brigade/scss-lint), [stylelint](https://github.com/stylelint/stylelint) |
|
||||
|
17
ale_linters/python/mypy.vim
Normal file
17
ale_linters/python/mypy.vim
Normal file
@ -0,0 +1,17 @@
|
||||
" Author: Keith Smiley <k@keith.so>
|
||||
" Description: mypy support for optional python typechecking
|
||||
|
||||
let g:ale_python_mypy_args = get(g:, 'ale_python_mypy_args', '')
|
||||
|
||||
function! g:ale_linters#python#mypy#GetCommand(buffer) abort
|
||||
return g:ale#util#stdin_wrapper
|
||||
\ . ' .py mypy --show-column-numbers '
|
||||
\ . g:ale_python_mypy_args
|
||||
endfunction
|
||||
|
||||
call g:ale#linter#Define('python', {
|
||||
\ 'name': 'mypy',
|
||||
\ 'executable': 'mypy',
|
||||
\ 'command_callback': 'ale_linters#python#mypy#GetCommand',
|
||||
\ 'callback': 'ale#handlers#HandleGCCFormat',
|
||||
\})
|
Loading…
Reference in New Issue
Block a user