Comparerr is a tool which which analyzes two versions of python software versioned by git with pylint and shows you errors which you added and fixed.
Project description
comparerr
Comparerr uses pylint to analyze 2 versions of python software versioned with git and lists you messages which did not occur in old version and messages which are no longer emitted. It is an alternative to pylints disabling of some messages because they are not useful or they are false positives.
Example
We have 2 branches. Master is the most recent stable development and pull request is my new changes which add new feature to my software.
- master
- pullrequest
I want to know if i did not add some new warning to those which were already occurring. So i will run:
$ comparerr "./.git" "master" "pullrequest" --error-only --targets src/ tests/ \*.py
Let me explain what happens here.
"./.git"first argument is a location of the git repository"master"first git reference for comparison"pullrequest"second git reference for comparison--error-onlyoptions which forces pylint and comparerr to work only with errors in code and not search for example coding style issues.--targets src/ tests/ \*.pythese are folders and files which we want to analyze with pylint. Please note escaped asterisk symbol. You can use regex but you must escape it, because your shell could and most probably will resolve them in context of your current working directory
Now lets see the output.
Fixed errors:
Message: Instance of 'JunkClass' has no '_non_existent' member
File: /junk.py
Line: 4
Context:
class JunkClass:
def __init__(self):
self._non_existent += 1
Added errors:
Message: Undefined variable 'variabble'
File: /junk.py
Line: 9
Context:
def great_method(self, keyword=None):
variable = 1
print(variabble)
First block Fixed errors: shows us what messages have not been present in analysis of new version.
Second block Added errors: shows us what messages have been added in analysis of new version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file comparerr-0.2.0.tar.gz.
File metadata
- Download URL: comparerr-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd491f5dfd5a45639b878b409042c382fe0567a68b40dffb83b5abb8e4f7c03
|
|
| MD5 |
396a1b49ec7605b8839d1cc10da65c8b
|
|
| BLAKE2b-256 |
cf225905a75027fc632437c1d2ca5fcd1101c8f6bce2fe489c5c531f64497e6b
|
File details
Details for the file comparerr-0.2.0-py3-none-any.whl.
File metadata
- Download URL: comparerr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b17e9a4c0ba0a6372aabed9b1ab4210f3cda15a0994895d7e33f6d4942fbd3dd
|
|
| MD5 |
e41f8af44043d1c36c6ad340ba025889
|
|
| BLAKE2b-256 |
30b0209afb35eb34ab189c75fdea286af74e5527e40bd4742d2f8149ef995b7a
|