Skip to main content

/(re)lint/

reLint

Regular Expression Linter

Write your own linting rules using regular expressions.

PyPi Version Test Coverage GitHub License

Sponsors

Sponsors

Installation

uvx relint
# or, if you have super advanced linting expressions
uvx --with "relint[regex]" relint

Examples & Recipes – The reLint Cookbook

Usage

You can write your own regular rules in a YAML file, like so:

- name: No ToDo
  pattern: '(?i)todo' # case insensitive flag
  hint: Get it done right away!
  filePattern: .*\.(py|js)
  error: false

The name attribute is the name of your linter, the pattern can be any regular expression. The linter does lint entire files, therefore your expressions can match multiple lines and include newlines.

You can narrow down the file types your linter should be working with, by providing the optional filePattern attribute. The default is .*.

The optional error attribute allows you to only show a warning but not exit with a bad (non-zero) exit code. The default is true.

The following command will lint all files in the current directory:

relint -c .relint.yml FILE FILE2 ...

The default configuration file name is .relint.yml within your working directory, but you can provide any YAML or JSON file.

If you prefer linting changed files (cached on git) you can use the option --diff [-d] or --git-diff [-g]:

git diff --unified=0 | relint my_file.py --diff

pre-commit

You can automate the linting process by adding a pre-commit hook to your project. Add the following entry to your .pre-commit-config.yaml:

- repo: https://github.com/codingjoe/relint
  rev: 1.4.0
  hooks:
    - id: relint
      args: [-W]  # optional, if you want to fail on warnings during commit

Metadata

Release files for relint 3.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for relint 3.6.0
File Size Uploaded
relint-3.6.0.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for relint 3.6.0
File Interpreter ABI Platform
relint-3.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / relint-3.6.0.tar.gz

Download URL relint-3.6.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ddadb158a88b494be5c343b36e591282c24372be7d5d8cc7995ae6e2f1c05944
BLAKE2b-256 checksum
How to use checksums
d9efd0230e2b7e86abe2cdb7f9625a8232e38feb0a09009d3ca4db16e02c0f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / relint-3.6.0-py3-none-any.whl

Download URL relint-3.6.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
958d8a58af21e9a61b1f69e2b7c6810182085b0422c24b211079bd7181754640
BLAKE2b-256 checksum
How to use checksums
377380c887c7c154b1e6ff778443df2e9fd96ed5a7ddaf6f16ebc10797be97a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

3.6.1

2 release files

This release

3.6.0 This release

2 release files

3.5.0

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

1 release file

1.0.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page