[PYTHON] Specify options when running flake8 with flycheck

background

You can use flycheck to run various checkers on Emacs with very little configuration, for example python code [flake8](http: //: //). I check it with flake8.readthedocs.io /), and in a specific project, I may want to skip the check of pep8, so I will summarize the setting method.

Configuration file search order

Controlled by flycheck-locate-config-file-functions

  1. The directory where the source to be checked is located
  2. Ancestor directory
  3. Home directory

It is searched in the order of.

Configuration file name

In the case of flake8, the file name of the value of flycheck-flake8rc is searched. The default value is ".flake8rc"

Setting Example

If you want to skip all but checking for pep8 runtime errors (E9 *) in that project and just check for pyflakes (F *), create a file called .flake8rc in the root directory of the project source with the following content: Good (hits in the "ancestor directory" written in the search order)

[flake8]
select = E9,F

Recommended Posts

Specify options when running flake8 with flycheck
Specify options when running python
python memo --Specify options with getopt
Be careful when running CakePHP3 with PHP7.2
I get a UnicodeDecodeError when running with mod_wsgi
Be careful when reading data with pandas (specify dtype)
Specify hint with pymongo
Options when installing libraries that cannot be piped with pyenv