[package]
name = "llmlint"
version = "0.1.7"
edition = "2021"
rust-version = "1.85"
description = "LLM-as-judge linter: enforce code-quality checks deterministic linters can't express, by driving real coding harnesses through oneharness."
license = "MIT"
repository = "https://github.com/nickderobertis/llmlint"
homepage = "https://github.com/nickderobertis/llmlint"
readme = "README.md"
keywords = ["cli", "linter", "llm", "code-review", "oneharness"]
categories = ["command-line-utilities", "development-tools"]
# Package only what a crates.io consumer needs: the sources, manifest, readme,
# license, and the `assets/` embedded via `include_str!`. This keeps the
# published crate small and excludes the CLAUDE.md/AGENTS.md symlink (crates.io
# rejects symlinks), CI config, scripts, and the e2e tests + mock-oneharness
# fixture — a feature-gated, test-only bin that never builds in a default
# `cargo install`/`cargo publish`.
include = [
    "src/**/*.rs",
    "Cargo.toml",
    "README.md",
    "LICENSE",
    "assets/*",
]

[[bin]]
name = "llmlint"
path = "src/main.rs"

[lib]
name = "llmlint"
path = "src/lib.rs"

# Test-only fixture: a fake `oneharness` the e2e tests drive via the
# `--oneharness-bin` override, so the spawn/parse/vote path is proven
# hermetically and cross-platform. Gated behind a feature so it never ships in
# `cargo install`.
[[bin]]
name = "llmlint-mock-oneharness"
path = "tests/support/mock_oneharness.rs"
required-features = ["mock-oneharness"]

[features]
# Builds the mock-oneharness fixture. Enabled by `just test`/`just check` and CI.
mock-oneharness = []

[dependencies]
clap = { version = "4.6", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml_ng = "0.10"
minijinja = "2"
ignore = "0.4"
globset = "0.4"
thiserror = "2"
wait-timeout = "0.2"
tempfile = "3"

[dev-dependencies]
assert_cmd = "2"
predicates = "3"
# Statistical micro-benchmarks of the pure engine (see `benches/`). Default
# features (plotters HTML reports, rayon) are dropped to keep the dependency
# tree — and the `cargo deny` surface — small; `cargo_bench_support` is the only
# feature `cargo bench` needs, and it still emits the per-bench `estimates.json`
# that `critcmp` diffs.
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }

[[test]]
name = "e2e"
path = "tests/e2e/main.rs"

# Statistical micro-benchmarks of the pure engine hot paths (config parse, plan,
# template render, schema, vote, report). `harness = false` hands `main` to
# Criterion instead of libtest, so `cargo nextest`/coverage never pick it up —
# it is measured, not gated. `cargo clippy --all-targets` still type-checks it,
# so it cannot rot.
[[bench]]
name = "engine"
harness = false

# Deterministic allocation tallies for the same hot paths: a plain `main` with a
# counting global allocator, no Criterion. Exact counts compare across runs and
# commits without statistics; informational like every bench target.
[[bench]]
name = "engine_allocs"
harness = false

# A CLI binary: optimize for a small, fast-starting artifact.
[profile.release]
strip = true
lto = "thin"
codegen-units = 1

# Profiling builds: the shipped release artifact exactly, but with symbols kept
# so `samply` (see `scripts/profile.sh`) can attribute time to functions, and
# `cachegrind`/`callgrind` (see `scripts/bench-instructions.sh`) can be annotated
# afterwards. Never affects the published binary — `just profile` builds
# `--profile profiling` into `target/profiling/` while `[profile.release]` stays
# stripped.
[profile.profiling]
inherits = "release"
debug = true
strip = false
