lintkit is a framework for building linters/code checking rules
- Multiple formats: Python-first, but supports YAML, JSON and TOML
- Comprehensive:
noqacomments, 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 -
<1000lines 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:
Legal
- 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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lintkit-4.1.0.tar.gz | 47.0 kB | With provenance | Details for lintkit-4.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lintkit-4.1.0-py3-none-any.whl | Python 3 | none | any | Details for lintkit-4.1.0-py3-none-any.whl |
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 logRelease 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 logSecurity for lintkit 4.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lintkit-4.1.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.