Pylint - distinguish new errors from old ones

Does anyone know how to distinguish between new errors (those that were detected during the last Pylint run) and old errors (that were found during the previous runs) in the Pylint report?

I use Pylint in one of my projects, and the project is quite large. Pylint reports quite a few errors (although I disabled them in rcfile). Although I correct these errors over time, it is also important not to introduce new ones. But Pylint HTML and β€œparsed” reports do not distinguish between new errors from those that were previously identified, although I run Pylint with the persistent=yes parameter.

Now - I compare old and new reports manually. However, it would be very nice if Pylint could somehow highlight those error messages that were found at the last start, but were not found in the previous one. Can this be done using Pylint or existing tools or something else? Of course, if not, it seems I will write my own comparison and reporting.

+7
source share
1 answer

Two main approaches. Correct the errors as they appear so that there are no old ones. Or, if you have no intention of fixing certain types of lint errors, tell lint to stop reporting them.

If you have many files, it would be nice to get a lint report for each file separately, record the lint reports for version control, such as svn, and then use the diff utility for version control to separate new lint errors from old ones. The reason for separate reports for each .py file is to make reading diff output easier.

If you are on Linux, vim -d oldfile newfile is a great way to read diff. If you're on Windows, just use the diff function built into Tortoise SVN.

+2
source

All Articles