https://github.com/farhanmustar/ale-python-linter
Python linter for vim-ale.
https://github.com/farhanmustar/ale-python-linter
ale linter python python-linter python2 python3 vim vim-plugin vim-plugins
Last synced: 5 months ago
JSON representation
Python linter for vim-ale.
- Host: GitHub
- URL: https://github.com/farhanmustar/ale-python-linter
- Owner: farhanmustar
- License: mit
- Created: 2020-12-23T14:48:08.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-23T23:39:56.000Z (about 5 years ago)
- Last Synced: 2025-03-17T16:32:17.639Z (10 months ago)
- Topics: ale, linter, python, python-linter, python2, python3, vim, vim-plugin, vim-plugins
- Language: Vim script
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ale Python Linter
A python linter plugin for [ dense-analysis/ale ](https://github.com/dense-analysis/ale/).
Ported from [vim-syntastic/syntastic](https://github.com/vim-syntastic/syntastic).
- Simple python linter using the [`compile`](https://docs.python.org/3/library/functions.html#compile) function.
- Works on both python2 and python3.
## Installation
This plugin require ```dense-analysis/ale```. Follow ale installation process [here](https://github.com/dense-analysis/ale/#3-installation).
Installation using [Vundle.vim](https://github.com/VundleVim/Vundle.vim).
```vim
Plugin 'farhanmustar/ale-python-linter'
```
Installation using [vim-plug](https://github.com/junegunn/vim-plug).
```vim
Plug 'farhanmustar/ale-python-linter'
```
Enable python linter by adding these lines in ```~/.vimrc```.
```vim
let g:ale_linters = {
\ 'python': ['python'],
\}
```
## Configuration
By default this plugin will use ```python``` keyword to execute linter script.
Therefore, to use this plugin we need to makesure python is executable by vim.
Execute this command in vim to check:
```vim
:echo executable('python')
```
Alternatively user can configure to use ```python2``` or ```python3``` keyword by adding this to ```~/.vimrc```:
```vim
let g:ale_python_python_executable = 'python2'
```