pylint icon indicating copy to clipboard operation
pylint copied to clipboard

Print the filepaths of checked files when the verbose option is activated

Open Kristinita opened this issue 1 year ago • 0 comments

1. Summary

It would be nice if Pylint would print the filepaths of the files it checked to the console. This can be implemented, for example, by adding:

  1. The desired behavior if the user uses a CLI argument --verbose
  2. A new CLI argument, with a name like --print-filepaths

If requested behavior is already possible, please add to the documentation what needs to be done to get it.

2. Example of desired behavior

The same as implemented, for example, in pydocstyle:

# [INFO] No pydocstyle output if all docstrings in all files are valid
pydocstyle .

# [INFO] Print filepaths all checked files if “--verbose” argument enabled
pydocstyle . --verbose

Checking file .\pelicanconf.py.
Checking file .\pelican_settings_loader.py.
Checking file .\publishconf.py.
Checking file .\jinja_filters\jinja_filter_all.py.
Checking file .\jinja_filters\jinja_filter_any.py.
Checking file .\personal-plugins\autotitle\autotitle.py.
Checking file .\personal-plugins\autotitle\__init__.py.
Checking file .\personal-plugins\putkiry\putkiry.py.
Checking file .\personal-plugins\putkiry\__init__.py.

3. Reasons why the feature is needed

  1. Checking whether the user has configured Pylint options ignore, ignore-paths and ignore-patterns correctly.
  2. Checking that Pylint actually checks all files necessary for the user. For example, earlier Pylint don’t supported analyzing directories with no __init__ files in them. Pylint may not analyze some directories/files, but the user may not understand this.

4. Not helped

I couldn’t find how I can get the desired behavior in:

  1. “Pylint output” page of Pylint documentation
  2. pylintrc example on this repository
  3. Google. I found a 2017 answer on Stack Overflow, “This currently isn’t possible” to a similar question.

Thanks.

Kristinita avatar Jan 11 '24 10:01 Kristinita