Skip to main content

Universal flakehell replacement for almost any linter you like

Project description

linthell 🔥

Universal flakehell alternative that works with almost any linter you like.

Usage

All examples are shown with flake8, edit them for you case.

At first generate baseline file for every linter you use:

flake8 . | linthell baseline -b baseline-flake8.txt -f <linter regex>

Then lint your project via linthell:

flake8 . | linthell lint -b baseline-flake8.txt -f <linter regex>

Custom linter format

If you use another linter then you must provide custom regex string string to parse it's output. Default format is flake8 default format. Some premade formats for linters:

  • flake8: (?P<path>[a-zA-Z0-9\._-]+(?:[\\/][a-zA-Z0-9\._-]+)*):(?P<line>\d+):\d+: (?P<message>[^\n]+)
  • pydocstyle: (?P<path>[a-zA-Z0-9\._-]+(?:[\\/][a-zA-Z0-9\._-]+)*):(?P<line>\d+).+\n\s+(?P<message>[^\n]+)
  • pylint: (?P<path>[a-zA-Z0-9\._-]+(?:[\\/][a-zA-Z0-9\._-]+)*):(?P<line>\d+):\d+: (?P<message>[^\n]+)

Create your own format regex

You can use your custom format regex. Suitable regex must contains 3 named python-like capturing groups:

  • path - relative file path
  • line - line number
  • message - linter message

Your regex should matchs all message related to an issue because unfiltered issues are printed by the whole match.

You can test your regex against linter output with regexr.

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

linthell-0.1.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

linthell-0.1.1-py3-none-any.whl (3.1 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