Another custom linter layer
Project description
custolint is a small library that help you customize your existing validations in pipelines:
Link to sphinx documentation [to be placed here] also a icon.
Implements:
Motivation
When you have a big old code base with thousands of lines, you can not just include a linter and enable 100% checks.
Instead, you just enable 1% of the checks, which is very sad for a decent developer.
Could you just enable to only check your changes ? YES, you can.
There is a better solution for this ! Welcome custolint - custom linter.
Idea
TODO: draw a diagram. Given we have a project alike custolint, where we:
changed a the function custolint/git.py:_blame
added a new function custolint/generics.py:filer_output
$ tree
.
|-- config.d
| |-- mypy.ini
| `-- pylintrc
|-- mypy.ini
|-- pyproject.toml
|-- setup.cfg
|-- src
| |-- custolint
| | |-- __init__.py
| | |-- cli.py
| | |-- coverage.py
| | |-- flake8.py
| | |-- generics.py
| | |-- git.py
| | |-- mypy.py
| | |-- pylint.py
| | `-- typing.py
|-- tests
| `-- test_custolint.py
We have to detect affected files with git diff and git blame
custolint/git.py
custolint/generics.py
Run the linter tool (pylint, flake8, mypy, coverage …) with all available feature enables (the configuration have to be placed into config.d/ folder) only on changed affected files or parse log/result of the linter tool.
3. Match changed code with the linters output, and consider only the match lines as failed lint criteria. It have to detect that custolint/generics.py:filer_output need unitest for coverage and custolint/git.py:_blame introduce a mypy typing issue.
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 Distributions
Built Distribution
Hashes for custolint-0.0.4.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f1bb2c5bf9d9176cd5d312e07b9409d51d895a9a19ab7930c5dee9d991ab814 |
|
MD5 | 5cb52492a466ce06e67d9461a2c79723 |
|
BLAKE2b-256 | 42d15b6cb340a0761361ed2ce1b89fe45d77cb9f11ff84174ba30e918391292a |