Godlint
One policy engine for every language in your repository.
MIT License · Contributing · Security · Code of Conduct
Pre-alpha: Godlint has an early local CLI and its first cross-language rules. Its public API, configuration format, and rule suites are not stable yet.
Godlint is an open-source, deterministic code-policy engine for polyglot repositories. It will help teams define engineering standards once and enforce them consistently across Rust, TypeScript/JavaScript, and Python.
Godlint is designed for architecture, reliability, test quality, security, and maintainability policies that single-language linters cannot enforce across a whole repository. It will complement established tools such as Clippy, ESLint, Ruff, and Pyright—not replace them.
What Godlint will provide
- One local-first CLI with deterministic pass/fail results.
- Shared policy concepts with language-aware detection.
- Repository and cross-language architecture checks.
- Accountable exceptions: scope, reason, owner, issue, and expiry.
- Gradual adoption through baselines and diff-aware enforcement.
- Terminal, JSON, and SARIF reports for local development and CI.
Initial scope
The first release will focus on Rust, TypeScript/JavaScript, and Python. The planned MVP emphasizes high-confidence rules: file and function size, complexity, centralized configuration, swallowed errors, timeouts, test assertions, policy hygiene, and import cycles.
The project will not use an LLM to decide whether CI passes, replace compilers or formatters, or support arbitrary third-party plugins in its early releases.
Status and roadmap
See the rule roadmap for the rule families, thresholds, and delivery sequence. The implementation sequence is:
- Workspace, CLI, configuration, diagnostics, fixtures, and documentation.
- Syntax analysis for all three initial languages and common facts.
- High-confidence file and repository rules, exceptions, baseline, and SARIF.
- Caching, architecture graph, and GitHub Actions integration.
- Optional semantic workers and ecosystem-tool adapters.
Install
A prebuilt binary needs no toolchain. Releases carry Linux and macOS on both architectures,
Windows, and a statically linked Linux build for containers without glibc. Download the archive for
your platform from the latest release, check
it against the .sha256 beside it, and put godlint on your PATH:
tar -xzf godlint-x86_64-unknown-linux-gnu.tar.gz
install -m 755 godlint /usr/local/bin/
On npm, npm install --save-dev @godlint/cli fetches only the binary for your platform and needs no
Rust toolchain, which is the point: Godlint lints JavaScript, TypeScript and Python, and most people
working in those languages do not have one. The command it installs is godlint; the package is
scoped because npm holds the bare name too close to an existing one.
On PyPI, pip install godlint installs the same binary and likewise needs no Rust toolchain.
With a Rust toolchain, cargo install godlint-cli builds the same binary. The library crate,
godlint-core, is published because the command line depends on it; its API is not stable before
1.0.
Use
Godlint enforces nothing until a configuration asks it to. Write godlint.yaml at the repository
root and adopt the suite:
version: 1
suites: [recommended@1]
godlint check
check reads the current directory when given no paths. It exits non-zero when a finding is at or
above fail-on, which is what makes enforcement one line in CI:
- run: godlint check
On GitHub, the action installs the binary and puts every finding on the line it belongs to:
- uses: tomerwave/godlint@v1
with:
version: 0.1.6
Findings appear as annotations in Files changed and disappear when they are fixed, so nothing has to
be resolved by hand. It needs no token and no permissions, which is also why it works on a pull
request from a fork, where the token is read-only and anything posted through the API fails. Pin
version: the default is the latest release, and a floating version changes what a pull request is
held to without a commit saying so. Because GitHub renders only so many annotations per run, the job
summary carries the count for every rule.
check --format decides who is reading. terminal is the default; github emits annotations so
findings land on the exact line of a pull request diff; json and sarif are documents for another
tool to consume, and both are emitted even when there is nothing to report, because a consumer parses
a document rather than prose.
Two commands answer the questions that follow. godlint config validate rejects a configuration
before it is trusted, and godlint suppressions lists every exemption with its owner and expiry,
so an exception that has outlived its reason fails the build rather than accumulating quietly.
Local development
Godlint currently requires Rust 1.97.1. After installing Rust with
rustup, run the same checks used by CI:
cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps
cargo run -p godlint-cli -- check .
The initial command shell is available with:
cargo run -p godlint-cli -- --version
Configuration validation is the first implemented product capability:
godlint config validate
godlint config validate --config path/to/godlint.yaml
The check command evaluates the configured rules across Rust,
TypeScript/JavaScript, and Python source files. Twenty-one rules are implemented:
maintainability/file-size— effective lines in a file.maintainability/function-size— effective lines in a function.maintainability/function-nesting— how deeply control-flow blocks nest inside a function.maintainability/parameter-count— declared parameters, excluding a method receiver.maintainability/decision-complexity— branch points in a function. Amatchorswitchcounts once rather than once per arm, and a guard on an arm counts.maintainability/return-count— exit paths from a function, explicit or implicit.maintainability/function-statements— statements in a function, through nested blocks but not into nested functions.maintainability/empty-function— function bodies that appear unintentionally empty.policy/todo-requires-reference— TODO-style markers that need an issue reference.style/no-comments— commentary where the code should speak for itself.policy/accountable-suppression— inline suppressions that cannot account for themselves.policy/unused-suppression— inline suppressions that no longer silence an enabled finding.architecture/restricted-call— abrupt process exits, plus configured direct callees outside their approved paths.security/no-dynamic-execution— JavaScripteval,Function, andnew Function; Pythonevalandexec.security/direct-environment-read— environment access outside a configuration boundary.reliability/explicit-timer-delay— JavaScript/TypeScript timers that omit their explicit millisecond delay.logging/no-production-log— debug logging outside the paths a repository approves.architecture/restricted-import— imports of modules a repository puts behind a boundary.architecture/dependency-boundary— a dependency that runs against the declared layer order.security/forbidden-dependency— an import of a package the project has ruled out.architecture/filename-case— a file name that does not follow the convention for its extension or its declared scope:PascalCasefor.tsx/.jsx,kebab-casefor other JavaScript and TypeScript,snake_casefor Rust and Python.
The call rules read the callee exactly as it is spelled, and the import rules read the
module the same way. std::env::var is matched and the
aliased env::var after use std::env is not, because knowing they name the same function
needs resolution Godlint does not have yet — see
the rule roadmap for what that defers. They also have no scope
analysis, so a local binding that shadows a restricted name is reported: a Python parameter
called exec, or a const process = … in TypeScript. Enable them deliberately; each is
off until a repository configures it.
One consequence of built-in restrictions being language-bound is worth knowing before you
write a policy: a name a built-in already claims belongs to that built-in's language. Giving
sys.exit an allow-in boundary scopes Python's, and a call spelled sys.exit in TypeScript
is left alone — there is no language key to say which you meant, so the policy is silent rather
than wrong.
A name no built-in claims belongs to no language and applies wherever it is called, which is
what a policy about loadConfig means. print, console.log, console.debug and dbg! are
now in that group rather than the first: logging/no-production-log owns them as
dialect-bound defaults, so naming one under architecture/restricted-call restricts it in
every language. Restrict debug logging through the logging rule, which keeps the binding.
A function means the same thing in every language: Rust fn items and closures,
Python def functions and lambdas, and JavaScript/TypeScript function declarations,
function expressions, methods, and arrow functions. Findings below the configured
fail-on severity are reported without failing the command.
godlint check
godlint check crates
Policy suites
A suite names a set of rules and their thresholds so a repository adopts a standard in one line rather than twenty-one:
version: 1
suites:
- recommended@1
recommended@1 enables every rule at error. Its thresholds are measured rather than
borrowed — see the rule roadmap for each number and why.
Suites are opt-in: a configuration that names none enforces nothing. A rules: entry
overrides the suite for that rule, in either direction, so a repository can loosen one
threshold, tighten it, or decline a rule with severity: off without abandoning the rest.
Accountable exceptions
A single site can be exempted from a rule by a comment that says why, who owns it, and when the exemption lapses:
// godlint-ignore-next-line maintainability/function-size owner=tomer expires=2026-12-31 -- splitting this in #482
fn long_function() {
// ...
}
godlint-ignore-enclosing applies to the whole function containing it. There is no
file-wide form — that is what exclude is for. policy/accountable-suppression reports
a directive with no reason, an unknown rule, or an expiry in the past; and
policy/unused-suppression reports one that no longer hides an enabled finding. Neither
policy rule can be suppressed. List every exemption in the repository with:
godlint suppressions
See inline suppression for the full syntax and semantics.
Contributing
We welcome early design feedback, rule ideas backed by concrete examples, parser and performance research, documentation improvements, and eventually implementation contributions. Please read CONTRIBUTING.md and abide by the Code of Conduct.
Please do not file security vulnerabilities in public issues; use the process in SECURITY.md.
License
Godlint is released under the MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file godlint-0.1.9-py3-none-win_amd64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-win_amd64.whl
- Upload date:
- Size: 5.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5591e3fbb4a737eca2c185bca4575e9d362904656b27797f5e6f3d836ac3e7ba
|
|
| MD5 |
9315f734c3b18f739996243b48ce67a3
|
|
| BLAKE2b-256 |
235a2205a545a3de692261d52f8c78b4ef2884c70d22942d587c975e11fa8e9c
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-win_amd64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-win_amd64.whl -
Subject digest:
5591e3fbb4a737eca2c185bca4575e9d362904656b27797f5e6f3d836ac3e7ba - Sigstore transparency entry: 2281068574
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file godlint-0.1.9-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 6.6 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6ad390b08edffc4473273921c618cabbc7c54cb797277a9a04f9e863751dcd7
|
|
| MD5 |
f82bd0f6e2a22b7028f910505c19b344
|
|
| BLAKE2b-256 |
7a5392b3b3af883817a6ea1538d3e0bc1a8eee67810f27102a24b39493f715c3
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-musllinux_1_2_x86_64.whl -
Subject digest:
a6ad390b08edffc4473273921c618cabbc7c54cb797277a9a04f9e863751dcd7 - Sigstore transparency entry: 2281068517
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file godlint-0.1.9-py3-none-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: Python 3, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67ea065c823d38cde5b82f24d5de729b76c80cfba4634dacc40838eeb099beb
|
|
| MD5 |
634e2d41df729fb19d890aa95fe5ece8
|
|
| BLAKE2b-256 |
617cd0896fc4949e5e758d979b2a24d3f59a7eea25d6b893ed89909c866a9c1e
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-musllinux_1_2_aarch64.whl -
Subject digest:
a67ea065c823d38cde5b82f24d5de729b76c80cfba4634dacc40838eeb099beb - Sigstore transparency entry: 2281068594
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file godlint-0.1.9-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 6.5 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b32d081fd0f2a3cb3b3ce9aa7c1ae198d45410f4db2f1c4ce9f640c291528798
|
|
| MD5 |
ae0347fd2a4f8e4fec623305870f9d72
|
|
| BLAKE2b-256 |
a4b57eca8caac75d43ff54530ce2b8dce4732c10729f290d9665f68093e0f48d
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-manylinux_2_17_x86_64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-manylinux_2_17_x86_64.whl -
Subject digest:
b32d081fd0f2a3cb3b3ce9aa7c1ae198d45410f4db2f1c4ce9f640c291528798 - Sigstore transparency entry: 2281068424
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file godlint-0.1.9-py3-none-manylinux_2_17_aarch64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-manylinux_2_17_aarch64.whl
- Upload date:
- Size: 6.5 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a19cf9da1ba54f5daeb5f2a301a771e3b247ee9adb5bbd5ba97c4d4e17a8a62
|
|
| MD5 |
7d7ec1ca3663c9725e23393bf60678ca
|
|
| BLAKE2b-256 |
072d3760f87fbae887bd7200fcc1a0b307d05a577ed6a39323d241a6dc4ce22c
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-manylinux_2_17_aarch64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-manylinux_2_17_aarch64.whl -
Subject digest:
0a19cf9da1ba54f5daeb5f2a301a771e3b247ee9adb5bbd5ba97c4d4e17a8a62 - Sigstore transparency entry: 2281068543
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file godlint-0.1.9-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d804002fdd8679952d0215438ee65df6ca7898b37b4f52790202fc99875dd2c
|
|
| MD5 |
c1848c52b4cf6202070b95b3819a6b44
|
|
| BLAKE2b-256 |
6602fb96af6c332a0153436d77bc283aab2267129254cbb0e2a9973920f3a737
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-macosx_11_0_arm64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-macosx_11_0_arm64.whl -
Subject digest:
2d804002fdd8679952d0215438ee65df6ca7898b37b4f52790202fc99875dd2c - Sigstore transparency entry: 2281068476
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file godlint-0.1.9-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: godlint-0.1.9-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42db1ddb13bcd4fc1880ef27301b9421102c557f1a1545931892d7d63383474b
|
|
| MD5 |
f1498e3083241ce42b92ddc1c01375f4
|
|
| BLAKE2b-256 |
a3a04e7de1d2bd792f742166ad3dd9427240fa5ab3068f9499f8a3bebeccc9eb
|
Provenance
The following attestation bundles were made for godlint-0.1.9-py3-none-macosx_10_12_x86_64.whl:
Publisher:
release.yml on tomerwave/godlint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
godlint-0.1.9-py3-none-macosx_10_12_x86_64.whl -
Subject digest:
42db1ddb13bcd4fc1880ef27301b9421102c557f1a1545931892d7d63383474b - Sigstore transparency entry: 2281068447
- Sigstore integration time:
-
Permalink:
tomerwave/godlint@810578c604565f384777bb48a4189b75d399c7d7 -
Branch / Tag:
refs/tags/v0.1.9 - Owner: https://github.com/tomerwave
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@810578c604565f384777bb48a4189b75d399c7d7 -
Trigger Event:
push
-
Statement type: