Skip to main content

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.

Files for lint-review, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size lint_review-0.1.1-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size lint_review-0.1.1.tar.gz (5.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page