1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! `llmlint lint-config`: lint llmlint config files with the bundled config-lint
//! rules, without requiring the user to add the plugin to their own config.
//!
//! This is the `lint` command with the bundled config-lint plugin included by
//! default (see [`crate::io::assets`] and [`crate::io::configfs::load_config_lint`]).
//! It runs in two phases, cheapest first:
//!
//! 1. **Comment check** — the deterministic, model-free validation of inline
//! `llmlint: ignore` directive *structure* in the target config files (the same
//! check `check-ignores` and the `lint` pre-flight run). A malformed directive
//! is a hard exit-2 error here, so a typo fails fast before any (paid) judge run.
//! 2. **Config lint** — the LLM-as-judge pass over each config's rules, reusing the
//! full lint engine (`lint::run_loaded`).
//!
//! The config-lint rules scope themselves to config-file globs, so the run always
//! targets configuration rather than source. Explicit `FILES` intersect those
//! globs like any other rule scope: naming configs narrows the run to them, and a
//! path the globs don't recognize as an llmlint config leaves its rules skipped.
use crateLintConfigArgs;
use crate;
use cratevalidate;
use crateResult;
use crate;