Skip to main content

Godlint logo: code brackets and a V mark inside a broken circle

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:

  1. Workspace, CLI, configuration, diagnostics, fixtures, and documentation.
  2. Syntax analysis for all three initial languages and common facts.
  3. High-confidence file and repository rules, exceptions, baseline, and SARIF.
  4. Caching, architecture graph, and GitHub Actions integration.
  5. 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

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. A match or switch counts 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 — JavaScript eval, Function, and new Function; Python eval and exec.
  • 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: PascalCase for .tsx/.jsx, kebab-case for other JavaScript and TypeScript, snake_case for 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

godlint-0.1.7-py3-none-win_amd64.whl (5.8 MB view details)

Uploaded Python 3Windows x86-64

godlint-0.1.7-py3-none-musllinux_1_2_x86_64.whl (6.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

godlint-0.1.7-py3-none-musllinux_1_2_aarch64.whl (6.5 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

godlint-0.1.7-py3-none-manylinux_2_17_x86_64.whl (6.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

godlint-0.1.7-py3-none-manylinux_2_17_aarch64.whl (6.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

godlint-0.1.7-py3-none-macosx_11_0_arm64.whl (6.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

godlint-0.1.7-py3-none-macosx_10_12_x86_64.whl (6.3 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file godlint-0.1.7-py3-none-win_amd64.whl.

File metadata

  • Download URL: godlint-0.1.7-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

Hashes for godlint-0.1.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 07000eeb8b9f2307d2e445acc85e1590b4957882e290005fc26f7b4eeb6283db
MD5 320adc6b639b741bb3f1ef4b9aa788e3
BLAKE2b-256 60da90016bf0805768510f026b3d5dfa3446749888a61d03fb6040b2a969eb5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-win_amd64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godlint-0.1.7-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for godlint-0.1.7-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 20c821ef79df89661036a4135a8ad09abf8a498f9bd39669bea9df7fd4d1ab15
MD5 46d0126163191cab474962048fbae18b
BLAKE2b-256 81d7a3ec8415cbb5fb8fa48a91014240d22b38e7192f0dfaa4a4ba85d96c36a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-musllinux_1_2_x86_64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godlint-0.1.7-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for godlint-0.1.7-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d160fd018eb1afc0845f5da2bb2685ee5e3da8cf04ca22d163e0d3c55fc29801
MD5 b0d5d7588c09aa1623444a4805d0902f
BLAKE2b-256 1cca8f2719a94966d8e342b5eb7d581bfbf9dedc9acfe41e35b7de9d96c3cb89

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-musllinux_1_2_aarch64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godlint-0.1.7-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for godlint-0.1.7-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7f7a847777ba5b4d4b020a590128b3aa6d56c9ea8ef952df269ca368887fd0c5
MD5 d37999cdd11a422c981fd37fadacf75b
BLAKE2b-256 a7347d688e44803dcf027205082a47c422e6db07621acd03ad10cc645d915053

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-manylinux_2_17_x86_64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godlint-0.1.7-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for godlint-0.1.7-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 aea3a0f3b67e02ff4c884771a9ee42a99423feec209e7e2247f5170463cea4e1
MD5 5a7c99ecf75f97d2ab9cd4bd0ccb5974
BLAKE2b-256 5be440c6461327c3a6526ca399a27e032447010300a9353a47c1e6514da45c0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-manylinux_2_17_aarch64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godlint-0.1.7-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for godlint-0.1.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15f9916030698bbdac6b1462ee66bc4dc4a635b0e33f66a8654696ee20c7cc03
MD5 afe95acc1207607c3e49a5077ec56442
BLAKE2b-256 080a2b17492fe7871a417c115617d58301e79b2afd21cf770bb6a6fadd6d78e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godlint-0.1.7-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for godlint-0.1.7-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3d1e1cd7601a5d1dbeeada008d9a9ec9e3e562a2f4ee0e2576ebc8affbb09541
MD5 b74a0e26049bcb03454bf8fca543a882
BLAKE2b-256 468015c7ce988b394d781bc5d5738e61deeb1b53ae2dd04493cffb394d160b1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for godlint-0.1.7-py3-none-macosx_10_12_x86_64.whl:

Publisher: release.yml on tomerwave/godlint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.9.1

7 files

0.9.0

7 files

0.8.0

7 files

0.7.0

7 files

0.6.2

7 files

0.6.1

7 files

0.6.0

7 files

0.5.0

7 files

0.4.0

7 files

0.3.0

7 files

0.2.0

7 files

0.1.9

7 files

0.1.8

7 files

This release

0.1.7 This release

7 files

0.1.6

7 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