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

后端 未结 14 2169
眼角桃花
眼角桃花 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:27

    1. touch __init__.py in the current directory
    2. touch __init__.py in every subdirectory that you want pylint to look at
    3. pylint $(pwd) (or equivalently pylint /absolute/path/to/current/directory)

提交回复
热议问题