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

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

    There is already an issue for this and hopefully gets fixed soon.

    If you do not prefer to use xargs you can just do a plain find-exec:

    find . -type f -name "*.py" -exec pylint -j 0 --exit-zero {} \;
    


    The problem I had with pylint Project-Dir is that all the absolute imports were not working.

提交回复
热议问题