jeudi 21 février 2019

Q: How can I store/save the results of Pylint execution?

I am using Pylint, I am new to this tool, so to count the quality of my python project (test automation). I know that if I want to test the quality of one file I have to execute the following command (for Windows10):

pylint name_of_file.py

If I want to execute the whole directory, I need to create a python file named __init__.py in the above directory and then to execute this command:

pylint name_of_the_directory

Also, as I mentioned above, I also use PyCharm. Through the interface of this IDE, pylint has a button named as Check Project which is validating the whole project. Please take a look on the screenshot of this interface:

enter image description here

An output from any of the above executions, would be like this:

something.py:12:4: C0111: Missing method docstring (missing-docstring)
something.py:16:4: C0111: Missing method docstring (missing-docstring)
something.py:20:4: C0111: Missing method docstring (missing-docstring)
something.py:25:4: C0111: Missing method docstring (missing-docstring)
something.py:31:4: C0111: Missing method docstring (missing-docstring)
something.py:35:4: C0111: Missing method docstring (missing-docstring)
something.py:39:4: C0111: Missing method docstring (missing-docstring)

What do I need: I want every after new build, the pylint results to be saved in a specific directory under a .txt format file, having as a name the current timestamp followed by the current's project version (stored into a property file). To me (if I am not wrong), it's like keeping the log output fo pylint execution. How can this happen?

In case is needed:

System information

  • Python version: 3.7
  • OS: Windows 10
  • IDE: PyCharm version: 2018.3.4
  • Framework: BDD Behave

Aucun commentaire:

Enregistrer un commentaire