alint 0.16.1__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -0,0 +1,386 @@
1
+ Metadata-Version: 2.1
2
+ Name: alint
3
+ Version: 0.16.1
4
+ Summary: Lint repository structure, filenames, and file content with a fast, config-driven engine.
5
+ Home-page: https://alint.org
6
+ License: MIT OR Apache-2.0
7
+ Project-URL: Homepage, https://alint.org
8
+ Project-URL: Source, https://github.com/asamarts/alint
9
+ Project-URL: Documentation, https://alint.org/docs/
10
+ Requires-Python: >=3.7
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Operating System :: MacOS
18
+ Classifier: Operating System :: Microsoft :: Windows
19
+ Classifier: Topic :: Software Development :: Quality Assurance
20
+ Classifier: Topic :: Utilities
21
+ Description-Content-Type: text/markdown
22
+
23
+ # alint
24
+
25
+ [![Crates.io](https://img.shields.io/github/v/tag/asamarts/alint?sort=semver&label=crates.io)](https://crates.io/crates/alint)
26
+ [![CI](https://github.com/asamarts/alint/actions/workflows/ci.yml/badge.svg)](https://github.com/asamarts/alint/actions/workflows/ci.yml)
27
+ [![License](https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue)](#license)
28
+
29
+ **Fast, language-agnostic linter for repository structure, files, and content.** Declare the shape your repo should have (required files, filename conventions, content patterns, values inside `package.json` / `Cargo.toml` / GitHub workflows, cross-file relationships) in a single `.alint.yml`. alint enforces it.
30
+
31
+ <!-- Absolute URL on purpose: this README is also the crates.io and npm landing
32
+ page, and neither resolves relative image paths. The GIF is generated from
33
+ demo/alint.tape (via demo/render.sh), never hand-recorded, so it cannot
34
+ drift from real output.
35
+
36
+ width="880" is REQUIRED and is half the GIF's native 1760px. Most people
37
+ read GitHub on a HiDPI display, where a 1x asset gets upscaled 2x by the
38
+ browser and small antialiased terminal glyphs turn to mush. At 2x native,
39
+ HiDPI maps this 1:1 to device pixels (sharp) and 1x displays downscale it
40
+ exactly 2:1 (clean). Drop the attribute and the 1760px source blows out the
41
+ column; set it to 100% and the letters go blurry again. -->
42
+ <img src="https://raw.githubusercontent.com/asamarts/alint/main/demo/alint.gif" width="880" alt="alint finding structural violations in a repo, fixing the mechanical ones, and leaving the structural ones for a human">
43
+
44
+ *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.*
45
+
46
+ - ⚡ **Fast at scale.** ~1.1 s on a 100K-file workspace bundle, ~12 s at 1M files. [Public benchmarks per release.](docs/benchmarks/HISTORY.md)
47
+ - 🤖 **Agent-aware.** First-class `agent` output format with per-violation `agent_instruction` strings; bundled `agent-hygiene` and `agent-context` rulesets for AI-touched repos.
48
+ - 🧰 **Powerful + extensible.** 105 rule kinds across 13 families, 22 bundled ecosystem rulesets, 12 auto-fix ops, 8 output formats, structured-query rules with full RFC 9535 JSONPath, cross-file relational rules, conditional `when:` gates over per-run facts, and `extends:` composition with SRI-pinned URLs.
49
+ - 📦 **One static Rust binary.** Any language, any repo. No plugin install, no Node/JVM/Python runtime needed.
50
+
51
+ Working `.alint.yml` configs for 30 OSS repos (single-language workspaces, polyglot monorepos, scale stress-tests) live under [`examples/`](examples/README.md), each with a writeup of what alint catches that the repo's existing tooling misses.
52
+
53
+ ## 60-second quickstart
54
+
55
+ ```sh
56
+ # Install (Linux + macOS; Windows via npm/cargo):
57
+ curl -sSL https://alint.org/install.sh | bash
58
+
59
+ # Initialise a config in the current repo (uses bundled oss-baseline + auto-detected ecosystem rulesets):
60
+ cat > .alint.yml <<'YAML'
61
+ version: 1
62
+ extends:
63
+ - alint://bundled/oss-baseline@v1
64
+ - alint://bundled/rust@v1 # auto-skips when not a Rust repo
65
+ - alint://bundled/ci/github-actions@v1
66
+ YAML
67
+
68
+ # Check:
69
+ alint check
70
+
71
+ # Auto-fix what's mechanically fixable (preview first):
72
+ alint fix --dry-run
73
+ alint fix
74
+ ```
75
+
76
+ Most bundled rulesets are gated by ecosystem facts (`has_rust`, `has_node`, `has_python`, and so on), so listing one for an ecosystem you don't have is a silent no-op; the compliance and Apache-governance sets (`reuse`, `apache-2`, `apache/governance`) and `agent-hygiene` carry no fact gate and always fire, so extending them is itself the opt-in. See [docs/rules.md](docs/rules.md) for the full rule catalogue and [alint.org](https://alint.org) for narrative docs.
77
+
78
+ ## Core capabilities
79
+
80
+ - **105 rule kinds** across 13 families: existence, content, naming, structured query (RFC 9535 JSONPath over JSON/YAML/TOML/XML/dotenv/properties/INI/HCL), text hygiene, security/unicode, encoding, structure, portable metadata, Unix metadata, git hygiene, cross-file relations, plugin (`command` shellout). Full reference: [`docs/rules.md`](docs/rules.md).
81
+ - **22 bundled rulesets**, compiled into the binary with no network round-trip: `oss-baseline` (a migration starting point for [Repolinter](https://github.com/todogroup/repolinter), archived in 2026: its 42-entry matrix maps 30 defaults fully, 8 partially, and 4 without a clean equivalent), seven language sets, `ci/github-actions`, a `monorepo` base plus Cargo / pnpm / Yarn workspace overlays, hygiene, tooling, ADR docs, compliance (`reuse`, `apache-2`), Apache TLP governance, and two agent-aware sets. Per-ruleset detail: [Bundled rulesets](#bundled-rulesets) below.
82
+ - **Auto-fix**: 12 ops covering content edits (whitespace, newlines, line endings, BOM/bidi/zero-width strip, blank-line collapse) and path ops (create/remove/rename/prepend/append). Preview with `alint fix --dry-run`. Configurable `fix_size_limit` (default 1 MiB) skips oversize files rather than rewriting them.
83
+ - **Conditional rules**: a bounded `when:` expression language (boolean logic, comparisons, `matches`, `in`) gates rules on *facts* evaluated once per run (predicate kinds: `all_files_exist`, `any_file_exists`, `count_files`, `file_content_matches`, `git_branch`, `custom`).
84
+ - **Composition**: `extends:` pulls in other configs by local path, HTTPS URL (SRI-pinned), or `alint://bundled/<name>@<rev>`. Children override field-by-field. Monorepos can opt into `nested_configs: true` for auto-discovered subtree-scoped `.alint.yml` files.
85
+ - **12 subcommands**: `check` (default; supports `--changed` for PR-fast-path linting), `fix`, `baseline` (snapshot current violations so `check --baseline` gates only on new ones), `init` (auto-detect ecosystem + scaffold), `validate-config` (parse-only; for editor LSP / pre-commit / fail-fast CI), `explain <rule>`, `list` (rules from this repo's config; `--category <slug>` to filter), `suggest` (scan for antipatterns and propose rules), `facts` (debug `when:` clauses), `export-agents-md` (sync `AGENTS.md` from active rules), `lsp` (language server over stdio for editor integrations), `rules` (browse the rule-kind catalog: `list` with `--search` over summaries, `show <kind>` for one kind, `categories`; config-independent, unlike the config-scoped `list`).
86
+ - **8 output formats**: `human`, `json` (stable schema), `sarif` (GitHub Code Scanning), `github` (inline PR annotations), `markdown` (PR comments), `junit` (CI test reports), `gitlab` (Code Quality), `agent` (LLM-shaped JSON with `agent_instruction` per violation).
87
+ - **JSON Schemas**: config at [`schemas/v1/config.json`](schemas/v1/config.json) for editor autocomplete; report shapes at [`schemas/v1/check-report.json`](schemas/v1/check-report.json) and [`schemas/v1/fix-report.json`](schemas/v1/fix-report.json) for downstream tooling.
88
+ - **Telemetry-free.** No network access at runtime, except the user-explicit `extends: https://...` URLs (SRI-pinned). Reproducible builds (`Cargo.lock` committed, pinned toolchain). See [SECURITY.md](SECURITY.md) for the threat model.
89
+ - **Official GitHub Action**: [`asamarts/alint@v0.16.1`](https://github.com/asamarts/alint).
90
+
91
+ ## Where alint shines
92
+
93
+ The 30 [example configs](examples/README.md) that ship with alint were not cherry-picked. We wrote a working config for each of those repos to find out where alint actually pulls its weight, and five recurring shapes of project came out of it.
94
+
95
+ 1. **Repos with verify-script sprawl.** Kubernetes hand-rolled 50 verify scripts; 17 declarative rules cover the structural ones. apache/airflow runs 109 pre-commit hooks, and roughly 40% map cleanly onto alint. python/cpython has 12 separate validation surfaces that collapse into a single config. About 75% of microsoft/vscode's `build/hygiene.ts` is expressible declaratively.
96
+ 2. **Repos that rely on convention without checking it.** tokio has no hand-rolled validation scripts at all, and alint catches 15 conventions its pipeline silently assumes. uv's 67-crate workspace conventions are enforced nowhere in CI today. pnpm maintains an in-tree `meta-updater` plugin to do this work. Same shape: facebook/react, nodejs/node.
97
+ 3. **Repos with mature tooling but no structural layer.** microsoft/typescript already runs eslint, dprint and knip. astral-sh/ruff ships 900+ Python lint rules, yet none cover ruff's own internal-crate `publish = false` discipline. dotnet/runtime carries roughly 2,300 XML manifests whose structural invariants no existing tool checks. Same shape: prettier, helm.
98
+ 4. **Repos that built their own lint-orchestration layer.** Around 86% of pytorch's 57 [`lintrunner`](https://github.com/suo/lintrunner) adapters are structural. alint sits underneath, and lintrunner keeps the AST-aware tail. bazel is the same shape, with hand-rolled CI scripts standing in for lintrunner.
99
+ 5. **Tightly curated, minimal-tooling projects.** golang/go has no `.github/workflows/`, no `Makefile`, no `.golangci.yml`. Its conventions live in code-review discipline. The 31-rule alint config writes that structural contract down for the first time.
100
+
101
+ Polyglot repos are a sixth shape. When one tree spans languages or platforms (apache/arrow's 6 languages, vercel/next.js in TS and Rust, NixOS/nixpkgs at 39k files, flutter's Dart framework with 6 native embedders, protobuf's 11 language bindings), no per-language linter sees the conventions that cut across them. alint is the layer that does.
102
+
103
+ If your repo matches none of these, alint is likely still useful, since the rule catalogue is broad. Start from whichever example is closest to your shape to see what a working config looks like.
104
+
105
+ ## Non-goals
106
+
107
+ alint is deliberately **not**:
108
+
109
+ - a code / AST linter (use [ESLint](https://eslint.org/), [Clippy](https://doc.rust-lang.org/clippy/), [ruff](https://docs.astral.sh/ruff/))
110
+ - a SAST scanner (use [Semgrep](https://semgrep.dev/), [CodeQL](https://codeql.github.com/))
111
+ - an IaC scanner (use [Checkov](https://www.checkov.io/), [Conftest](https://www.conftest.dev/), [tfsec](https://aquasecurity.github.io/tfsec/))
112
+ - a commit-message linter (use [commitlint](https://commitlint.js.org/))
113
+ - a secret scanner (use [gitleaks](https://github.com/gitleaks/gitleaks), [trufflehog](https://github.com/trufflesecurity/trufflehog))
114
+
115
+ Scope is the filesystem shape and contents of a repository, not the semantics of the code inside it.
116
+
117
+ ## Install
118
+
119
+ ### install.sh (Linux + macOS)
120
+
121
+ ```bash
122
+ curl -sSL https://alint.org/install.sh | bash
123
+ ```
124
+
125
+ Detects platform (Linux / macOS, x86_64 / aarch64), downloads the matching tarball, verifies the SHA-256, and installs to `$INSTALL_DIR` (default `~/.local/bin`). This shell path does not cover Windows; on Windows use `npm install -g @asamarts/alint`, `cargo install alint`, or download the Windows tarball from the [Releases page](https://github.com/asamarts/alint/releases).
126
+
127
+ ### Homebrew (macOS + Linuxbrew)
128
+
129
+ ```bash
130
+ brew tap asamarts/alint
131
+ brew install alint
132
+ ```
133
+
134
+ The [asamarts/homebrew-alint](https://github.com/asamarts/homebrew-alint) tap is auto-updated on every alint release. The formula downloads the matching pre-built binary, verifies its SHA-256, and installs to the Homebrew cellar.
135
+
136
+ ### From crates.io
137
+
138
+ ```bash
139
+ cargo install alint
140
+ ```
141
+
142
+ ### From npm
143
+
144
+ ```bash
145
+ # project-local
146
+ npm install --save-dev @asamarts/alint
147
+ npx alint check
148
+
149
+ # global (puts `alint` on PATH)
150
+ npm install -g @asamarts/alint
151
+ alint check
152
+ ```
153
+
154
+ The [@asamarts/alint](https://www.npmjs.com/package/@asamarts/alint) package is a thin shim that downloads the matching pre-built binary at install time, verifies its SHA-256 against the same `.sha256` companion `install.sh` and Homebrew use, and stages it under the package's `bin-platform/`. The package itself ships zero JS runtime behaviour. Set `ALINT_SKIP_INSTALL=1` to suppress the postinstall network hop in CI environments that snapshot `node_modules`.
155
+
156
+ ### From source
157
+
158
+ ```bash
159
+ git clone https://github.com/asamarts/alint
160
+ cd alint
161
+ cargo build --release -p alint
162
+ ./target/release/alint --help
163
+ ```
164
+
165
+ ### Docker
166
+
167
+ A distroless multi-arch image (`linux/amd64`, `linux/arm64`) is published to ghcr.io on each release:
168
+
169
+ ```bash
170
+ # Lint the current directory:
171
+ docker run --rm -v "$PWD:/repo" ghcr.io/asamarts/alint:latest
172
+
173
+ # Pin to an exact version:
174
+ docker run --rm -v "$PWD:/repo" ghcr.io/asamarts/alint:v0.16.1 check
175
+ ```
176
+
177
+ The image runs as the distroless `nonroot` user (UID 65532); host files must be world-readable. To apply fixes and preserve host ownership, pass `-u`:
178
+
179
+ ```bash
180
+ docker run --rm -u $(id -u):$(id -g) -v "$PWD:/repo" ghcr.io/asamarts/alint:latest fix
181
+ ```
182
+
183
+ Also published: the bare semver (`:0.16.1`), the `:<major>.<minor>` rolling channel, and the raw git tag (`:v0.16.1`).
184
+
185
+ ## Usage
186
+
187
+ The fastest on-ramp is `alint init`. It scans your repo for the obvious markers (Cargo.toml, package.json, pnpm-workspace.yaml, and so on) and writes a `.alint.yml` with the right `extends:` lines:
188
+
189
+ ```bash
190
+ alint init # ecosystem-aware (rust@v1, node@v1, and so on)
191
+ alint init --monorepo # plus workspace overlays for Cargo / pnpm / Yarn
192
+ ```
193
+
194
+ For an existing repo with prior debt, follow up with `alint suggest`. It scans for `*.bak` files, scratch docs at root, `console.log` residue in production source, and TODO markers older than 180 days, then proposes the bundled rulesets and rule entries that would catch them. Output is review-only; `suggest` never edits your config:
195
+
196
+ ```bash
197
+ alint suggest # human-readable proposal table
198
+ alint suggest --format yaml # paste-ready config snippet
199
+ alint suggest --format json # stable shape for agent consumption
200
+ alint suggest --explain # show file-level evidence per proposal
201
+ alint suggest --confidence high # raise the proposal threshold (low|medium|high; default medium)
202
+ alint suggest --include-bundled # also propose bundled rulesets you already extend
203
+ ```
204
+
205
+ For agent-driven workflows where `AGENTS.md` / `CLAUDE.md` / `.cursorrules` carries the directives the agent reads at session start, `alint export-agents-md` renders the active rule set as a markdown directive block. alint becomes the single source of truth, and the agent reads what alint enforces:
206
+
207
+ ```bash
208
+ alint export-agents-md # to stdout
209
+ alint export-agents-md --inline --output AGENTS.md # splice between alint markers
210
+ ```
211
+
212
+ `--inline` writes only between `<!-- alint:start -->` / `<!-- alint:end -->` markers; everything else in `AGENTS.md` is human-owned prose. Re-runs are idempotent (when the on-disk content already matches, no write happens), and missing markers auto-init with a stderr warning so the second run splices cleanly.
213
+
214
+ Each rule renders as a one-line directive: its `message:` when it sets one, otherwise its kind and scope (for example, "file_exists rule on README.md"), so a rule with no message still tells the agent what to enforce.
215
+
216
+ The generated file is editable: start there, override or extend as needed. If you'd rather hand-roll, the minimum viable shape is:
217
+
218
+ ```yaml
219
+ # .alint.yml
220
+ # yaml-language-server: $schema=https://raw.githubusercontent.com/asamarts/alint/main/schemas/v1/config.json
221
+ version: 1
222
+ extends:
223
+ - alint://bundled/oss-baseline@v1 # README/LICENSE/SECURITY.md, merge markers, hygiene
224
+ ```
225
+
226
+ Then run:
227
+
228
+ ```bash
229
+ alint check # run all rules against the current directory
230
+ alint fix --dry-run # preview the auto-fixes that would be applied
231
+ alint fix # apply every fixable violation in place
232
+ alint list # list effective rules (useful after extends / overrides)
233
+ alint explain <id> # show a rule's full, resolved definition
234
+ alint facts # evaluate facts against the repo; debug `when:` clauses
235
+ alint init [--monorepo] # scaffold a `.alint.yml` based on detected ecosystem + workspace shape
236
+ alint suggest # scan for known antipatterns and propose rules to catch them
237
+ alint export-agents-md # render the active rule set as an AGENTS.md directive section
238
+ ```
239
+
240
+ Output formats:
241
+
242
+ ```bash
243
+ alint check --format human # default; colorized; grouped by file
244
+ alint check --format json # stable, versioned JSON schema
245
+ alint check --format sarif # SARIF 2.1.0 (for GitHub Code Scanning)
246
+ alint check --format github # GitHub Actions workflow commands
247
+ alint check --format markdown # GFM, suited to PR comments / mkdocs
248
+ alint check --format junit # JUnit XML, the de-facto CI test report
249
+ alint check --format gitlab # GitLab Code Quality JSON (Code Climate spec)
250
+ alint check --format agent # LLM-shaped JSON; agent_instruction + fix_command per violation
251
+ ```
252
+
253
+ Exit codes: `0` no errors; `1` one or more errors; `2` config error; `3` internal error. Warnings do not fail by default; use `--fail-on-warning` to flip that.
254
+
255
+ ## Cookbook
256
+
257
+ Copy-pasteable recipes for composing bundled rulesets, structured-query rules over `package.json` / `Cargo.toml` / GitHub workflows, monorepo overlays + nested `.alint.yml`, conditional rules gated on per-run facts, custom `command` shellouts, fast PR-mode linting with `--changed`, auto-fix on commit, cross-file relationships, and per-iteration `when_iter:` filters.
258
+
259
+ Read at [alint.org/docs/cookbook/](https://alint.org/docs/cookbook/) (source: [`docs/site/cookbook/`](docs/site/cookbook/)).
260
+
261
+ ## Bundled rulesets
262
+
263
+ Twenty-two rulesets ship in the binary, with zero network round-trip, pinned to the version of alint you're running:
264
+
265
+ **Ecosystem + project-shape baselines**
266
+
267
+ - **`oss-baseline@v1`**: README / LICENSE / SECURITY.md / CODE_OF_CONDUCT.md / .gitignore existence; minimum sensible file sizes; merge-marker + bidi-control bans; trailing-whitespace and final-newline hygiene (auto-fixable).
268
+ - **`rust@v1`**: Cargo.toml / Cargo.lock / rust-toolchain.toml existence; no committed `target/`; snake_case source filenames; Trojan-Source defenses. Gated with `when: facts.has_rust`.
269
+ - **`node@v1`**: package.json + lockfile; no committed `node_modules/`, `dist/`, `.next/`, etc.; Node-version pin via `.nvmrc` or `engines`; JS/TS source hygiene. Gated with `when: facts.has_node`.
270
+ - **`python@v1`**: manifest (pyproject.toml / setup.py / setup.cfg) exists; lockfile (uv / poetry / Pipenv / PDM); pyproject.toml declares `project.name` + `project.requires-python` via structured-query; PEP 8 snake_case module filenames; Trojan-Source defenses. Gated with `when: facts.has_python`.
271
+ - **`go@v1`**: go.mod + go.sum at root; go.mod declares `module <path>` + `go <version>`; Trojan-Source defenses on `*.go`. Gated with `when: facts.has_go`.
272
+ - **`java@v1`**: Maven (`pom.xml`) or Gradle (`build.gradle` / `build.gradle.kts`) manifest; build wrapper (`mvnw` / `gradlew`); no committed `target/` / `build/` (using `git_tracked_only` so locally-built dirs stay silent); no committed `*.class`; PascalCase Java filenames; Trojan-Source defenses. Gated with `when: facts.has_java`.
273
+ - **`dotnet@v1`**: root `global.json` exists + pins a concrete SDK version; SDK-style `.csproj`; nullable reference types enabled; Central Package Management actually enabled when `Directory.Packages.props` exists; no committed `bin/` / `obj/`; root `.editorconfig`. Gated with `when: facts.has_dotnet`.
274
+ - **`php@v1`**: composer.json `name` is a valid lowercase `vendor/package`; the **Composer-fatals invariants** (every `autoload.psr-4` directory, `autoload.files` entry, and `bin` script resolves on disk); no committed `vendor/`. Gated with `when: facts.has_php`.
275
+ - **`monorepo@v1`**: every `packages/*`, `crates/*`, `apps/*`, `services/*` directory has a README + ecosystem manifest; unique basenames.
276
+
277
+ **Workspace-aware overlays** (use `when_iter:` to scope per-member checks to actual package directories, so non-package dirs under `crates/` / `packages/` don't fire false positives)
278
+
279
+ - **`monorepo/cargo-workspace@v1`**: Cargo workspaces. Gated by `facts.is_cargo_workspace` (root `Cargo.toml` has `[workspace]`). Verifies `members = [...]` is declared and every workspace member has a README + `[package].name`.
280
+ - **`monorepo/pnpm-workspace@v1`**: pnpm workspaces. Gated by `facts.is_pnpm_workspace` (root `pnpm-workspace.yaml` exists). Verifies the `packages:` declaration and per-member README + `name`.
281
+ - **`monorepo/yarn-workspace@v1`**: Yarn / npm workspaces. Gated by `facts.is_yarn_workspace` (root `package.json` has `"workspaces"`). Per-member README + `name`, scoped to `{packages,apps}/*`.
282
+
283
+ **Compliance & governance** (no fact gate; extending signals intent)
284
+
285
+ - **`compliance/reuse@v1`**: FSFE [REUSE Specification](https://reuse.software/) compliance: top-level `LICENSES/` directory + every source file declares both `SPDX-License-Identifier:` and `SPDX-FileCopyrightText:` in its first ~10 lines.
286
+ - **`compliance/apache-2@v1`**: Apache-2.0 compliance: LICENSE contains the Apache 2.0 text, root NOTICE file present, and every source file carries the canonical "Licensed under the Apache License, Version 2.0" header.
287
+ - **`apache/governance@v1`**: Apache Top-Level-Project (TLP) governance discipline: the release-artefact + governance baseline that arrow / spark / airflow each re-implement by hand. Rule ids are namespaced `apache-gov-*`, so it composes with `compliance/apache-2@v1` (license redistribution) without collision; severities are tiered (legally load-bearing artefacts `error`, release discipline `warning`, nice-to-haves `info`).
288
+
289
+ **Namespaced utilities**
290
+
291
+ - **`hygiene/no-tracked-artifacts@v1`**: build outputs (`node_modules`, `target`, `dist`, `__pycache__`, and more), OS junk (`.DS_Store`, `Thumbs.db`), editor backups (`*~`, `*.swp`), secret-shaped files (`.env` and locals), and files over 10 MiB. Several rules auto-fixable via `file_remove`.
292
+ - **`hygiene/lockfiles@v1`**: enforce lockfiles (`yarn.lock`, `pnpm-lock.yaml`, `package-lock.json`, `bun.lock`, `Cargo.lock`, `poetry.lock`, `uv.lock`) live only at the workspace root.
293
+ - **`tooling/editorconfig@v1`**: root `.editorconfig` + `.gitattributes` with line-ending normalization.
294
+ - **`docs/adr@v1`**: MADR-style Architecture Decision Records under `docs/adr/`: `NNNN-kebab-title.md` filename + required `## Status` / `## Context` / `## Decision` sections.
295
+ - **`ci/github-actions@v1`**: GitHub Actions hardening guided by OpenSSF Scorecard: workflow-level `permissions.contents: read`, pin third-party actions to full commit SHAs, every workflow declares a `name:`. Scoped to `.github/workflows/*.y{,a}ml`, so it no-ops in repos that don't use GitHub Actions.
296
+
297
+ **Agent-aware**
298
+
299
+ - **`agent-hygiene@v1`**: AI-coding-era cruft that shows up disproportionately in agent-authored commits: versioned-duplicate filenames, scratch / planning docs, AI-affirmation prose, debug residue (`debugger;` in non-test source), and model-attributed TODO markers. Composes with the hygiene rulesets; fires on every repo (no fact gate).
300
+ - **`agent-context@v1`**: hygiene for the agent-instruction files coding agents read each session (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.cursorrules`, `GEMINI.md`): existence, stale-reference, stub, and a ~200-300-line bloat guard. Gated with `when: facts.has_agent_context`, so it's a silent no-op in repos that ship no agent-context file.
301
+
302
+ All rulesets ship with non-blocking defaults (`info` / `warning` for recommendations, `error` only for unambiguous bugs). Override severity or scope by redeclaring the rule id in your own `.alint.yml`, or disable with `level: off`. Per-ruleset rule lists in [docs/rules.md](docs/rules.md#bundled-rulesets).
303
+
304
+ ## Use in CI
305
+
306
+ ### GitHub Actions
307
+
308
+ Inline PR annotations (default):
309
+
310
+ ```yaml
311
+ - uses: asamarts/alint@v0.16.1
312
+ ```
313
+
314
+ All inputs (all optional):
315
+
316
+ ```yaml
317
+ - uses: asamarts/alint@v0.16.1
318
+ with:
319
+ version: v0.16.1 # alint release tag (default: latest)
320
+ path: . # directory to lint (default: .)
321
+ format: github # human | json | sarif | github | markdown | junit | gitlab | agent (default: github)
322
+ config: | # extra config path(s), one per line
323
+ .alint.yml
324
+ fail-on-warning: false
325
+ args: "" # extra CLI args appended verbatim
326
+ ```
327
+
328
+ Upload findings to GitHub Code Scanning:
329
+
330
+ ```yaml
331
+ - uses: asamarts/alint@v0.16.1
332
+ id: alint
333
+ with:
334
+ format: sarif
335
+ continue-on-error: true
336
+ - uses: github/codeql-action/upload-sarif@v3
337
+ if: always()
338
+ with:
339
+ sarif_file: ${{ steps.alint.outputs.sarif-file }}
340
+ ```
341
+
342
+ ### pre-commit
343
+
344
+ Add to your `.pre-commit-config.yaml`:
345
+
346
+ ```yaml
347
+ repos:
348
+ - repo: https://github.com/asamarts/alint
349
+ rev: v0.16.1
350
+ hooks:
351
+ - id: alint
352
+ ```
353
+
354
+ The hook runs `alint check` against the repo's `.alint.yml`. For auto-fix, add `id: alint-fix`. It's registered under `stages: [manual]` so it only runs when invoked explicitly (`pre-commit run alint-fix`), since fixers mutate the tree.
355
+
356
+ ## Docs
357
+
358
+ - [**docs/rules.md**](docs/rules.md): per-rule user reference, one entry per rule kind with a YAML example and fix-op cross-reference.
359
+ - [**ARCHITECTURE.md**](docs/design/ARCHITECTURE.md): rule model, DSL, execution model, crate layout, plugin model.
360
+ - [**ROADMAP.md**](docs/design/ROADMAP.md): scope per version from v0.1 through v1.0.
361
+ - [**CHANGELOG.md**](CHANGELOG.md): per-version changes, breaking and otherwise.
362
+ - [**docs/benchmarks/METHODOLOGY.md**](docs/benchmarks/METHODOLOGY.md): how benchmarks are measured and published.
363
+ - Per-version, per-platform benchmark results under [`docs/benchmarks/macro/results/`](docs/benchmarks/macro/results/) (end-to-end wall-time) and [`docs/benchmarks/micro/results/`](docs/benchmarks/micro/results/) (criterion micro-benches).
364
+
365
+ ## Development
366
+
367
+ ```bash
368
+ git clone https://github.com/asamarts/alint
369
+ cd alint
370
+ cargo test --workspace # 2,000+ tests; includes end-to-end scenarios
371
+ cargo run -- check # dogfood: alint lints itself
372
+ cargo bench -p alint-bench # criterion micro-benches
373
+ ```
374
+
375
+ End-to-end tests live in `crates/alint-e2e/scenarios/` as declarative YAML; adding a new scenario only requires a new file. CLI snapshot tests live in `crates/alint/tests/cli/` under `trycmd`. Property-based invariants are in `crates/alint-e2e/tests/invariants.rs`.
376
+
377
+ CI is self-hosted with per-job bash scripts under `ci/scripts/` that run locally or in GitHub Actions unchanged. See [ci/env.example](ci/env.example) for runner setup.
378
+
379
+ ## License
380
+
381
+ Dual-licensed under either of:
382
+
383
+ - [Apache License 2.0](LICENSE-APACHE) ([SPDX `Apache-2.0`](https://spdx.org/licenses/Apache-2.0.html))
384
+ - [MIT License](LICENSE-MIT) ([SPDX `MIT`](https://spdx.org/licenses/MIT.html))
385
+
386
+ at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in alint shall be dual-licensed as above, without any additional terms or conditions.
@@ -0,0 +1,8 @@
1
+ alint-0.16.1.data/scripts/alint.exe,sha256=tMjzWderN7qpA0kHDvNzR--ZbKEQviqEGQw67ybczog,16182272
2
+ alint-0.16.1.dist-info/METADATA,sha256=zeYuaUcMadkQrrUSZzqRyZLvdtfuEcq_TI0UWzwLYGc,27671
3
+ alint-0.16.1.dist-info/WHEEL,sha256=-DVF-eo0EXHIWJeoylv-gRehSeyaapdDKh3tXfU5dgc,105
4
+ alint-0.16.1.dist-info/licenses/LICENSE-MIT,sha256=dskYibCnt7zr2tEUVO8qGxfGn-qr2vOntr2OVcSqYQU,1075
5
+ alint-0.16.1.dist-info/licenses/LICENSE-APACHE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ alint-0.16.1.dist-info/licenses/NOTICE,sha256=vRgOOIKCxPv_wCr6wVd-D_PYF_gR286I2o-urDH_kXQ,615
7
+ alint-0.16.1.dist-info/licenses/THIRD-PARTY-LICENSES.html,sha256=cPO-DivVqC8XvW-sqD1kD6mcSXJu-gXcZKJfuOq_by8,345216
8
+ alint-0.16.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: alint build_wheels.py (1.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 alint contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,16 @@
1
+ alint
2
+ Copyright (c) 2026 alint contributors
3
+
4
+ This product is dual-licensed under either of
5
+
6
+ * Apache License, Version 2.0 (see LICENSE-APACHE), or
7
+ * MIT license (see LICENSE-MIT)
8
+
9
+ at your option.
10
+
11
+ alint's release binaries statically link third-party open-source crates. The
12
+ copyright notices and full license texts for those crates are published as the
13
+ THIRD-PARTY-LICENSES.html asset attached to each GitHub release
14
+ (https://github.com/asamarts/alint/releases), regenerated from the exact
15
+ dependency graph of that build. A CycloneDX software bill of materials
16
+ (alint.cdx.json) is attached to the same release.