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 name of the linter
lintkit.settings.name = "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 3.2.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 3.2.0
File Size Uploaded
lintkit-3.2.0.tar.gz 46.2 kB Details

Built distribution (wheel)

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

Total release size: 97.6 kB

Release files / lintkit-3.2.0.tar.gz

Download URL lintkit-3.2.0.tar.gz
Size 46.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a1137a493d89d402ef171667a53c1584377bcce3142795770cfffd6eb38100b7
BLAKE2b-256 checksum
How to use checksums
f10234b181885bf2ab2a6b34d04801ec0546f5426b69fdbd3287fcabe2a23937
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 Aug 31, 2026.

Transparency log

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

Download URL lintkit-3.2.0-py3-none-any.whl
Size 51.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b073b5deae9aebfc5642fe144c42131a31ec3e0603af132b75a4bed698d2ed7
BLAKE2b-256 checksum
How to use checksums
bdd32157ac7ae8ef1e83a08ad12e6a8d37a93fc3b38c96e607e556ff4e91032b
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 Aug 31, 2026.

Transparency log

Release history Release notifications | RSS feed

4.1.0

2 release files

4.0.0

2 release files

This release

3.2.0 This release

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