Skip to main content

lintkit is a framework for building linters/code checking rules

  • Multiple formats: Python-first, but supports YAML, JSON and TOML
  • Comprehensive: noqa comments, file skips and standardized pretty output
  • Quick: Create and run custom rules in a few lines of code
  • Flexible: Rules over file(s), their subelements and more (see Files tutorial)
  • Minimal: Gentle learning curve - <1000 lines of code, tutorials, API reference

🚀 Quick start 📚 Documentation 🤝 Contribute 👍 Adopters 📜 Legal

Quick start

Below are ~20 lines of code implementing custom linter with two rules and running it on three files:

import lintkit

# Set the application identity and public rule prefix
lintkit.settings.name.tool = "noutils"
lintkit.settings.name.rule = "NOUTILS"


class _NoUtils(lintkit.check.Regex, lintkit.loader.Python, lintkit.rule.Node):
    def regex(self):
        # Regex to match util(s) variations in function/class name
        return r"_?[Uu]til(s|ities)?"

    def values(self):
        # Yield class or function names from a Python file
        data = self.getitem("nodes_map")
        for node in data[self.ast_class()]:
            yield lintkit.Value.from_python(node.name, node)

    def message(self, _):
        return f"{self.ast_class()} name contains util(s) word"


# Concrete rules and their codes
# Disabling linter using noqas supported out of the box!
class ClassNoUtils(_NoUtils, code=0):  # noqa: NOUTILS0
    # ast type we want to focus on in this rule
    def ast_class(self):
        return ast.ClassDef


class FunctionNoUtils(_NoUtils, code=1):  # noqa: NOUTILS0
    def ast_class(self):
        return ast.FunctionDef


lintkit.run(["linter.py", "file1.py", "file2.py"])

# Example output
# /path/file1.py:23:17 NOUTILS0: ClassDef name contains util(s) word
# /path/file2.py:73:21 NOUTILS1: FunctionDef name contains util(s) word

Installation

> pip install lintkit
# To create rules utilizing YAML
> pip install lintkit[rich, yaml]

# To load linter configuration
> pip install lintkit[config]

Learn

Check out the following links to learn more about lintkit:

Contribute

We welcome your contributions! Start here:

  • This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
  • This project is copyrighted by open-nudge - the appropriate copyright notice is included in each file.

Metadata

Release files for lintkit 4.0.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 lintkit 4.0.0
File Size Uploaded
lintkit-4.0.0.tar.gz 46.7 kB Details

Built distribution (wheel)

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

Total release size: 98.6 kB

Release files / lintkit-4.0.0.tar.gz

Download URL lintkit-4.0.0.tar.gz
Size 46.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2076db5e1cf6ac92ebf2c439fcc662d62a8bee43e2b940b37b81e3d66027fd16
BLAKE2b-256 checksum
How to use checksums
38c60326f598fe6241dbbc6a2c7d0d0a8fe0e5350a9225e83719d4d8cb41bb49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Sep 4, 2026.

Transparency log

Release files / lintkit-4.0.0-py3-none-any.whl

Download URL lintkit-4.0.0-py3-none-any.whl
Size 52.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f98eef068cc4870abb590e967a9390f2e30f93f3e3705b5f104dfafa3b948f5
BLAKE2b-256 checksum
How to use checksums
e6de80f14a8b4484f10163442f085017a346f70e7016a67a0f63538df2efc411
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

4.1.0

2 release files

This release

4.0.0 This release

2 release files

3.2.0

2 release files

3.0.0

2 release files

1.2.1

2 release files

1.1.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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