Development system (3)

Date: 2021/08/27 (initial publish), 2021/08/29 (last update)

Source: en/note-00025.md

Previous Post Top Next Post

TOC

Pointers to linting tools.

See Re-learning Vim (2) to understand how linters are used from Vim frontend.

Shell

shellcheck

vim as formtter

Python

In case of doubt, chose one lint in ~/.vim/vimrc for ALE by UN-commenting out (instead of running 3 linters, use fast flake8-only):

  let g:ale_linters = {'python': ['flake8']}
  "let g:ale_linters = {'python': ['pylint']}
  "let g:ale_linters = {'python': ['mypy']}

See https://github.com/osamuaoki/dot-vim

pylint

The template for ~/.config/pylintrc is created by :pylint --generate-rcfile >~/.config/pylintrc

~/.config/pylintrc mod:

disable=print-statement,
        parameter-unpacking,
        ...
# extras
        invalid-name,
        line-too-long,
        missing-function-docstring,
        useless-return,
        duplicate-code

flake8 – wrapper around pycodestyle and pyflakes and mccabe

~/.config/flake8:

[flake8]
ignore = E226,E302,E41
max-line-length = 160

Here, E41 means E41*.

Black – formatter

isort – formatter

Previous Post Top Next Post