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.1.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.1.0
File Size Uploaded
lintkit-4.1.0.tar.gz 47.0 kB Details

Built distribution (wheel)

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

Total release size: 99.5 kB

Release files / lintkit-4.1.0.tar.gz

Download URL lintkit-4.1.0.tar.gz
Size 47.0 kB
Tags Source
SHA-256 checksum
How to use checksums
488efe389e91e5425938f86c26d5d9776399dce59b9918cf4a13baa371ff7e90
BLAKE2b-256 checksum
How to use checksums
0646800ed0d6fd31a327ef4cb69b6253b5c06366b85293d0b4ab50ed790efa13
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 17, 2026.

Transparency log

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

Download URL lintkit-4.1.0-py3-none-any.whl
Size 52.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ae95b0988ae1a94356889975a0001674d8aa8da698d9811aecb84cbe9be0f8d
BLAKE2b-256 checksum
How to use checksums
991ac04a894f61732a5efb4bbe572455b0869f2c6a1eac0b58e8d5119f162e97
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 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.1.0 This release

2 release files

4.0.0

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