Run Pylint for all Python files in a directory and all subdirectories

后端 未结 14 2167
眼角桃花
眼角桃花 2021-01-30 19:45

I have

find . -iname \"*.py\" -exec pylint -E {} ;\\

and

FILES=$(find . -iname \"*.py\")
pylint -E $FILES

If

14条回答
  •  一生所求
    2021-01-30 20:42

    pytest with pytest-pylint can trivially run pylint on all Python files:

    In your setup.cfg file in the root directory of your project, ensure you have at minimum:

    [tool:pytest]
    addopts = --pylint 
    

    Next, run pytest on the command line.

提交回复
热议问题