Skip to main content

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.

You cannot just take and (Boromir meme)

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
  1. We have to detect affected files with git diff and git blame

  • custolint/git.py

  • custolint/generics.py

  1. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

custolint-0.0.4.dev1-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page