Code review from any linter!
Project description
lint_review
Plug in any linter for a code review!
Features:
- Creates merge request comments according to linter comments
- Easy to expand to any linter - just pass
--custom-pattern
with a regex capturing the important parts of the linter errors. - Automatically resolves any comments that are no longer relevant.
Usage:
- Create an access token with
api
premissions - Pipe your linter into
lint_review
as part of your merge request CI - Make a few mistakes (we all do)
- Fix the comments as they pop up
Full interface
usage: lint_review [-h] [--linter {flake8,mypy}] --reviewer {dry,gitlab}
[--custom_pattern CUSTOM_PATTERN] [--token TOKEN]
[--project PROJECT] [--merge_request MERGE_REQUEST]
optional arguments:
-h, --help show this help message and exit
--linter {flake8,mypy}
Name of the linter to use
--reviewer {dry,gitlab}
The service used to review the code
--custom_pattern CUSTOM_PATTERN
A custom regex pattern to capture comments. The
pattern must have the named capture groups: {'line',
'message', 'path'} and optionally col
gitlab:
--token TOKEN API token for gitlab, Is required for gitlab usage
--project PROJECT Project ID of the merge request, defaults to
enviroment variable set by pipeline.
--merge_request MERGE_REQUEST
Internal ID of the merge request, defaults to
enviroment variable set by pipeline.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lint_review-0.1.2.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file lint_review-0.1.2.tar.gz
.
File metadata
- Download URL: lint_review-0.1.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/4.19.78-coreos
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83233d1ee6b6d9b4f075799e7b7d996110363eb6756467485bbac79bce005585 |
|
MD5 | fe8a2e81380d0aa18bfffcdffa5e786d |
|
BLAKE2b-256 | 94961306596d7cc1f9f9b6605fa71c40a37c33c6742aff8c37d3087093bc8f8d |
File details
Details for the file lint_review-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: lint_review-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.9 Linux/4.19.78-coreos
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ebdb997644f5090f584c32e2da7e49bf75edfa4716e9c1b00ae53582c9ceded |
|
MD5 | b8928b51f851992d5dc2f49f6ab8dc76 |
|
BLAKE2b-256 | 0f1b659151f79e0956ee66d1978d144bf14962072b0da478bd302031d736dfee |