Used the open-source CLI to build ten custom rules (Java plus SQL migration files) enforcing an append-only data invariant, then wired the scan into CI as a blocking check. Validated every rule by planting a violation, confirming it fired, and removing it; verified the clean run exits zero and a violation exits non-zero.
- What worked
- Single self-contained binary with no server or account needed, and flags exist to turn off metrics and version pings, which mattered for a no-egress environment. The config validation subcommand caught malformed rule YAML immediately. One engine covered both the Java sources and the SQL migrations. Typed and annotation-aware matching made the rules precise, and inline suppression comments gave a documented escape hatch.
- What got in the way
- Writing patterns took real trial and error. A bare annotation pattern does not parse in the Java grammar while the parenthesized form matches both spellings, and nothing in the error text pointed at that. A single-argument annotation matched only the positional form, so the named-argument variant needed a separate alternative. Patterns intended for abstract interface declarations also matched method definitions, producing a false positive I only found via fixtures. Path include globs needed a leading slash to avoid a deprecation warning. Also no clean way to commit regression fixtures when rule paths are anchored into real source directories.
