No description
  • Rust 93.5%
  • Shell 4.7%
  • Python 0.7%
  • TypeScript 0.5%
  • Kotlin 0.3%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alex Samartsau 1fad287816
Some checks failed
Action self-test / default (github annotations) (push) Waiting to run
Action self-test / sarif output (push) Waiting to run
Action self-test / json output (push) Waiting to run
Action self-test / pinned version input (push) Waiting to run
Action self-test / config input (single path) (push) Waiting to run
Action self-test / config input (multiple paths rejected) (push) Waiting to run
bench-docker / build + push image (push) Waiting to run
CI / Test (push) Blocked by required conditions
CI / Detect Changes (push) Waiting to run
CI / Secrets Inventory (push) Waiting to run
CI / Action Pins (push) Waiting to run
CI / Format (push) Blocked by required conditions
CI / MSRV (push) Blocked by required conditions
CI / Clippy (push) Blocked by required conditions
CI / YAML Compare (push) Blocked by required conditions
CI / Audit (push) Blocked by required conditions
CI / Deny (push) Blocked by required conditions
CI / Supply Chain (push) Blocked by required conditions
CI / Build (push) Blocked by required conditions
CI / Docs (push) Blocked by required conditions
CI / Dogfood (push) Blocked by required conditions
CI / Bench Smoke (push) Blocked by required conditions
CI / Perf Gate (deterministic) (push) Blocked by required conditions
CI / Perf Gate (v0.18.2 reference) (push) Blocked by required conditions
CI / Examples (push) Blocked by required conditions
CI / Shell Tests (push) Blocked by required conditions
CI / Plugin contract (witforge) (push) Blocked by required conditions
CI / Packaging (push) Blocked by required conditions
CI / Editors (VS Code + Zed + JetBrains) (push) Blocked by required conditions
CI / Summary (push) Blocked by required conditions
Coverage / cargo-llvm-cov (push) Waiting to run
Cross-Platform / macos-latest (push) Waiting to run
Cross-Platform / windows-11-arm (push) Waiting to run
Cross-Platform / windows-latest (push) Waiting to run
editors e2e (LSP integration) / VS Code extension (headless) (push) Waiting to run
editors e2e (LSP integration) / Neovim LSP smoke (headless) (push) Waiting to run
editors e2e (LSP integration) / Tier-2 editor configs (static) (push) Waiting to run
editors e2e (LSP integration) / JetBrains LSP e2e (headless) (push) Waiting to run
Docs bundle / Build + push docs bundle (push) Has been cancelled
chore: migrate repository references to zeropier org (#690)
2026-12-03 15:53:36 -05:00
.github chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
action fix: close audited correctness gaps 2026-10-17 15:23:40 -04:00
bench chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
branding chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
ci chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
crates chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
demo fix: full repository audit hardening, docs alignment, and E2E coverage (#672) 2026-11-27 04:53:38 -05:00
docs chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
editors chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
examples chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
npm chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
schemas chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
wit chore(plugin): bump witforge consumer to 0.6.0 (#625) 2026-11-22 20:55:51 -05:00
xtask chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
.alint.yml fix: full repository audit hardening, docs alignment, and E2E coverage (#672) 2026-11-27 04:53:38 -05:00
.dockerignore ci(release): attach SBOM + third-party-license bundle, hash installer (P1-a) (#185) 2026-08-19 21:06:36 -04:00
.gitattributes feat: version 2 selectors, relations and a draft schema (experimental, phase 6 of v0.23) (#558) 2026-11-17 06:49:19 -05:00
.github-account Initial commit: add .github-account marker 2026-04-18 15:44:03 -04:00
.gitignore chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
.pre-commit-hooks.yaml chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
about.hbs ci(release): attach SBOM + third-party-license bundle, hash installer (P1-a) (#185) 2026-08-19 21:06:36 -04:00
about.toml fix: full repository audit hardening, docs alignment, and E2E coverage (#672) 2026-11-27 04:53:38 -05:00
action.yml chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
Cargo.lock chore(deps): bump the patch-and-minor group across 1 directory with 8 updates (#683) 2026-12-02 20:23:58 -05:00
Cargo.toml chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
CHANGELOG.md chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
CODE_OF_CONDUCT.md chore(privacy): scrub personal email — use alint.org aliases 2026-05-10 10:18:54 -04:00
CONTRIBUTING.md chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
deny.toml fix: close Phase 4 audit gaps in LSP server, HCL parser, and docs (#658) 2026-11-24 20:05:47 -05:00
Dockerfile chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
facts.json chore(release): bump workspace to 0.24.0 (#681) 2026-12-01 20:41:19 -05:00
GOVERNANCE.md chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
install.sh chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
LICENSE-APACHE Pre-publish hygiene pass: rename binary, publish flags, LICENSE, README 2026-04-18 19:26:08 -04:00
LICENSE-MIT Pre-publish hygiene pass: rename binary, publish flags, LICENSE, README 2026-04-18 19:26:08 -04:00
NOTICE chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
README.md chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
RELEASING.md chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00
roadmap.json chore(v0.25): record ADR-0051, v0.25 plan, and land Phase 0 fixes (#689) 2026-12-03 12:43:20 -05:00
rust-toolchain.toml Bootstrap v0.1 workspace and design docs 2026-04-18 17:40:45 -04:00
SECURITY.md chore: migrate repository references to zeropier org (#690) 2026-12-03 15:53:36 -05:00

alint

crates.io CI License

A fast, general linter.

Code linters check what's inside a source file. alint checks the repository around it: files that should or shouldn't exist, naming conventions, file contents, values buried in package.json, Cargo.toml or a workflow YAML, and the relationships between files. The rules live in one .alint.yml and run on every pull request, in pre-commit and in your editor.

Fast at scale: the workspace-bundle benchmark checks 100,000 files in about 1.5 seconds and one million in under 20 seconds (measured on every release).

Every repository has a shape it is supposed to keep. Every package carries a README. Workflows pin their actions to a commit SHA. Nobody commits target/ or node_modules/. Source files that need a license header have one. These rules are real, and a repo drifts when they slip, but they usually live in a reviewer's head or a line of CONTRIBUTING.md, where nothing fails when a pull request ignores them.

alint writes those rules down and enforces them. It takes over from Repolinter (archived in 2026), runs alongside ESLint, Clippy, or Ruff, and ships as a single static Rust binary with nothing to install at runtime.

alint finding structural violations in a repo, fixing the mechanical ones, and leaving the structural ones for a human

A tracked target/, an unpinned GitHub Action, a scratch planning doc at the repo root, and whitespace drift. alint finds all of it, fixes what is mechanical, and leaves what needs a decision. No per-language linter sees any of it.

Quickstart

# Install (Linux and macOS; Windows via npm, cargo, or the release tarball):
curl -fsSL https://alint.org/install.sh | bash

# Start from a few bundled rulesets:
cat > .alint.yml <<'YAML'
version: 1
extends:
  - alint://bundled/oss-baseline@v1          # README, LICENSE, hygiene, merge markers
  - alint://bundled/rust@v1                   # auto-skips when there is no Rust
  - alint://bundled/ci/github-actions@v1      # pin actions, least-privilege workflows
YAML

alint check            # report what is wrong
alint fix --dry-run    # preview the mechanical repairs
alint fix              # apply them

alint init writes that file for you by detecting the ecosystems in your repo, so you rarely start from a blank page. The quickstart on alint.org walks a first config end to end.

Ruleset authors can put versioned fixture documents under alint-tests/ and run alint test. Each test owns an isolated repository tree, config, environment, Git history, ordered check/fix steps, inline expectations, and an optional JSON snapshot. The public alint-testkit crate exposes the same hermetic runner.

How it works

A config is a list of rules, but you rarely write them all by hand. extends: composes rulesets, and alint ships 25 of them compiled into the binary, so there is no download and no network round trip. Most are gated on what the repo actually contains, so listing the Rust ruleset in a repo with no Rust does nothing. You layer your own rules on top, and override or switch off anything you inherit.

A rule is three things: a kind (the check to run, such as file_exists, filename_case, or pair), the paths it applies to, and a severity. There are 105 rule kinds across 13 families, plus 11 aliases. A rule can also carry a when: condition (run only on the default branch, or only when some file exists) and a fix:.

# .alint.yml
version: 1
extends:
  - alint://bundled/oss-baseline@v1
rules:
  - id: no-focused-tests                 # a rule of your own, on top of the ruleset
    kind: file_content_forbidden
    paths: ["**/*.test.ts"]
    pattern: '\.only\('
    message: "Remove .only() so CI runs the whole suite, not one test"
    level: error

Under the hood, alint walks the repository once, in parallel, honoring .gitignore, and reads each file's bytes at most once. The engine, the rules, the output formatters, and a language server for editors are all one binary, with no dynamically loaded plugins (an external tool can only be spawned per file by the opt-in, top-level-only command rule kind) and nothing from Node, the JVM, or Python in the path. The concepts guide and ARCHITECTURE.md go deeper.

What it can check

The 105 rule kinds group into a handful of themes. The rule reference has every one with an example; a tour of the highlights:

  • Files and structure. Require or forbid specific files and directories; cap file size, line count, directory depth, and files per directory; reject committed build output and OS junk.
  • Naming. Filename case and regex conventions, with case-collision and reserved-name safety for cross-platform checkouts.
  • Content. Required headers and footers, forbidden patterns such as merge markers or debug residue, and the everyday hygiene: trailing whitespace, final newlines, line endings, line width.
  • Config values. Read into JSON, YAML, TOML, XML, dotenv, INI, .properties, and HCL with RFC 9535 JSONPath, then assert a value, match a pattern, forbid a key, or validate the whole file against a JSON Schema. Require package.json to declare a license, or every workflow to set permissions: contents: read.
  • Cross-file relationships. The primitives most tools lack: pair (every .proto has its generated binding), every_matching_has (every packages/* has a README and a manifest), unique_by (no two crates share a name), file_graph (no import cycles or orphaned modules), key_parity (every locale file, or a local .env, declares the reference file's keys), and generated_file_fresh (a checked-in generated file still matches its source).
  • Security and encoding. Immutable CI/container references across GitHub Actions, pre-commit, CircleCI, GitLab, Cloud Build, and Dockerfiles; Trojan-Source bidirectional controls, zero-width characters, byte-order marks, and text-encoding sanity.
  • Git hygiene. Commit-message shape, sign-off and GPG signing, denied paths, and blame age.
  • Metadata. Executable bits and shebangs, symlink and submodule policy, portable-filename checks.

When no kind fits, the command kind runs a tool you already trust and turns its exit code into a violation, so a one-off check still lives in the same config as everything else.

Fixing, not just finding

Plenty of violations are mechanical: a missing final newline, a stray byte-order mark, an unsorted CODEOWNERS, a license header sitting above the shebang instead of below it. alint fix repairs those in place, with 26 ops covering content hygiene, structured-config edits, file and git operations, and list ordering. The ones that need a human decision it shows you or suggests, rather than guessing.

Each of the 26 auto-fix ops carries a safety tier, so a bare alint fix never surprises you:

  • Safe fixes apply on a plain alint fix: whitespace and newline hygiene, line endings, header placement, sorting a marked block, reindentation.
  • Unsafe fixes change meaning or remove content, so they wait for alint fix --unsafe-fixes: deleting a file, a regex replace, dropping a committed artifact from git's index. (As of v0.17, removing a file is Unsafe. A plain alint fix now suggests the deletion rather than doing it.)
  • Suggestions are reported but never written, for violations with no mechanical repair.

Preview with alint fix --dry-run, or alint fix --diff for the exact edits. alint batches a file's edits in memory, writes each file once, and re-runs until the tree stops changing; a size limit (1 MiB by default) skips oversize files rather than rewriting them.

Because extends: can pull a ruleset from a URL, a fix that injects or remotely aims content (replace, file_create, file_prepend, and similar operations) from a remote or nested ruleset is demoted to a suggestion unless you list that source under trusted_extends:. The cap is applied to the effective fixer after field composition and template expansion, while a fix that shells out is refused from anywhere but your own top-level config. Every op is listed in the rule reference.

Adopt it without a flag day

You do not have to fix everything the first time alint runs. alint baseline records today's violations behind a content fingerprint, and alint check --baseline then passes on those and fails only on genuinely new ones. Turn it on as a blocking gate on day one and burn down the backlog on your own schedule, the way you would introduce a type checker to an untyped codebase.

Where it runs

  • Pull requests. The zeropier/alint GitHub Action annotates changed lines inline or uploads SARIF to Code Scanning, and alint check --changed lints only the files a PR touched.
  • Commits. A pre-commit hook (a prebuilt wheel, no toolchain) checks every commit; a manual alint-fix hook repairs on request.
  • Your editor. alint lsp is a language server (diagnostics, hover-to-explain, apply-fix code actions), with marketplace extensions for VS Code and JetBrains, a source extension for Zed, and ready configs for Neovim, Sublime Text, Emacs, and Helix.
  • Coding agents. The agent output format carries a per-violation instruction and fix command, and alint export-agents-md keeps the directives in AGENTS.md or CLAUDE.md in step with the rules alint enforces, so the agent and CI agree on the contract.
  • Any CI. 8 output formats cover most pipelines: human, json, sarif, github, markdown, junit, gitlab, and agent. Exit codes are stable: 0 clean, 1 violations, 2 config error, 3 internal.

Bundled rulesets

alint ships 25 bundled ecosystem rulesets inside the binary, pinned to the version you run and reachable as alint://bundled/<name>@v1 (plus opt-in @v2 rulesets for version: 2 configs). They group into:

  • Ecosystem baselines, each gated so it is a no-op off-ecosystem: rust, node, python, go, java, dotnet, php, plus the always-on oss-baseline (the README / LICENSE / hygiene starting point, and a clean migration target for Repolinter).
  • Cross-file consistency: versioning keeps release versions aligned across manifests, charts, API descriptions, and changelogs; toolchain-pins aligns exact Node, Rust, Python, Ruby, JVM, and .NET pins across local, Docker, and CI declarations; js/workspace-deps@v2 (experimental version: 2) enforces consistent external dependency version ranges across JavaScript/TypeScript workspace package.json manifests.
  • Monorepo overlays: a monorepo base plus cargo-workspace, pnpm-workspace, and yarn-workspace overlays that scope per-member checks to real package directories.
  • CI and tooling: ci/github-actions (OpenSSF-guided workflow hardening), tooling/editorconfig, docs/adr, and the hygiene/* artifact and lockfile sets.
  • Compliance and governance: compliance/reuse, compliance/apache-2, and apache/governance (the Apache TLP release discipline that arrow, spark, and airflow each re-implement by hand).
  • Agent-aware: agent-hygiene (scratch docs, duplicate-versioned files, and debug residue that cluster in agent-authored commits) and agent-context (keeps AGENTS.md and friends honest).

Rulesets ship non-blocking by default: info or warning for recommendations, error only for unambiguous bugs. Redeclare a rule id in your own config to change its severity or scope, or set level: off. The bundled-ruleset reference lists every rule in each.

On real repositories

alint ships working configs for 30 open-source projects, from single-language libraries to polyglot monorepos, each with a writeup of what alint catches that the project's own tooling misses. Writing them surfaced a few patterns that recur:

  • Projects that lean on a convention without enforcing it. tokio has no validation scripts, yet its pipeline quietly assumes conventions alint can hold to.
  • Projects drowning in hand-rolled verify scripts. Kubernetes maintains dozens of hack/verify-*.sh; the structural ones collapse into a handful of declarative rules.
  • Projects with excellent code linters but no structural layer. ruff ships 900+ Python rules and still cannot check that its own internal crates keep publish = false.
  • Polyglot trees no single per-language linter sees across: apache/arrow spans six languages, vercel/next.js is TypeScript and Rust, NixOS/nixpkgs is tens of thousands of files.

Start from the example closest to your repo, or see how alint compares with other tools and how to migrate from Repolinter.

What alint is not

alint checks the shape and contents of a repository, not the semantics of the code inside it. It is deliberately not:

  • a code or AST linter (use ESLint, Clippy, Ruff)
  • a SAST scanner (use Semgrep, CodeQL)
  • an IaC scanner (use Checkov, Conftest)
  • a full commit-message linter: the git_commit_* rule kinds cover basic shape checks (subject length and regex, sign-off, fixup commits), but for conventional-commit grammars, scopes and body/footer rules use commitlint
  • a secret scanner (use gitleaks, TruffleHog)

It runs underneath those, and keeps its rules on the filesystem so they can keep theirs on the code.

Install

# install.sh (Linux, macOS; x86_64 and aarch64)
curl -fsSL https://alint.org/install.sh | bash

# Homebrew (macOS, Linuxbrew)
brew install zeropier/alint/alint

# crates.io
cargo install alint

# npm (also puts alint on PATH; for Windows or a project-local dev dependency)
npm install -g @asamarts/alint

# PyPI (uvx / pipx / pip; the wheel embeds the binary, so no Python in the hot path)
uvx alint check
uv tool install alint

install.sh detects your platform, downloads the matching tarball, verifies its SHA-256, and installs to ~/.local/bin. The npm and PyPI packages ship the same prebuilt binary inside per-platform packages, with no install script, so both work under --ignore-scripts, from offline mirrors, and on Windows (x64 and arm64). A distroless multi-arch Docker image is published to ghcr.io on every release:

docker run --rm -v "$PWD:/repo" ghcr.io/asamarts/alint:v0.24.0 check

Build from source with cargo build --release -p alint. Every channel and platform is covered in the installation guide.

alint is telemetry-free and makes no network access at runtime, except for the extends: URLs you write yourself, which must be SRI-pinned. The threat model is in SECURITY.md.

Documentation

alint.org is the narrative home. The pages worth bookmarking:

In the repo: CHANGELOG.md for the per-version history, docs/benchmarks/ for methodology and per-release results, and SECURITY.md for the threat model.

Development

git clone https://github.com/zeropier/alint
cd alint
cargo test --workspace     # Rust tests plus 717 declarative end-to-end policy tests
cargo run -- check         # dogfood: alint lints its own repo
cargo bench -p alint-bench # criterion micro-benches

alint is an eleven-crate Cargo workspace. Seven crates publish to crates.io: alint (the binary), alint-core (the engine API), alint-testkit (the versioned policy-test model and hermetic runner), plus the internal implementation crates alint-dsl, alint-rules, alint-output, and alint-lsp. General policy tests live under crates/alint-e2e/scenarios/; bundled ruleset tests live beside their owners under crates/alint-dsl/ruleset-tests/<rev>/. CLI snapshots run through trycmd, and CI jobs use scripts under ci/scripts/.

License

Dual-licensed under either Apache License 2.0 or the MIT License, at your option. Unless you state otherwise, any contribution you submit for inclusion in alint is dual-licensed the same way, with no additional terms.