[Fixed]-Pylint recursively for a given filename

16👍

Depending on your operating system, you could use:

find project_name -name urls.py | xargs pylint

4👍

Try with find:

find ./project_name/ -name "urls.py" -exec pylint '{}' \;

If you want to run multiple files in a single call to pylint:

find ./project_name/ -name "urls.py" -exec pylint '{}' +

3👍

  • Get all python files (recursive)
  • Pass them all at once to pylint (from answer by Robin)
  • Show output in console and put it in a file

find . -name "*.py" -print0 | xargs -0 pylint 2>&1 | tee err_pylint.rst~

Leave a comment