Skip to content
lawlint
Esc
navigateopen⌘Jpreview
On this page

Linting documents

Choosing input, selecting rules, and picking an output format.

Input

lawlint contract.docx     # a file
lawlint -                 # stdin, explicitly
cat memo.txt | lawlint    # stdin, implicitly

Format is inferred from the extension. For piped Markdown there is no extension to infer from, so pass --markdown — see File formats.

Choosing rules

lawlint --rules no-em-dash,no-hedging draft.md

Runs exactly the listed rules and nothing else. Useful when you want a single question answered rather than a full review.

lawlint --disable no-legalese,no-semicolons contract.docx

Runs the full set minus the listed rules. This is the right shape for a house style: most of the defaults, minus the handful that fight your conventions.

// .lawlint/config.json
{
  "disable": ["no-legalese", "no-semicolons"],
  "severity": { "no-em-dash": "suggestion" }
}

Committed to the repo, so everyone on the project lints the same way. See Configuration.

Both flags accept full rule ids or bare aliases, and both override the corresponding config file setting.

Output formats

lawlint draft.md

The default. Human-readable findings with the source line, the span underlined, and a suggestion where one exists — followed by the human-likeness score.

Add --quiet to suppress it entirely while keeping the exit code, which is what you usually want in CI.

lawlint draft.md --format json

The full result as JSON: every diagnostic with its rule id, severity, tier, intent, span, line and column, excerpt, suggestion, and fix — plus document stats. See the JSON output reference.

lawlint draft.md --format prompt

An AI revision brief: the flagged text plus instructions, formatted to hand straight to a writing assistant. This is the reverse of --judge — instead of asking a model to find problems, it asks one to fix the problems lawlint already found deterministically.

Extra rule packages

lawlint --rule-dir ./house-style draft.md
lawlint --rule-dir ./house-style --rule-dir ./team-rules draft.md

Repeatable, and merged over the built-ins — a package rule with the same id as a built-in replaces it. The durable equivalent is ruleDirs in .lawlint/config.json.

See Authoring rules for what goes in one.

Limiting noise

lawlint --max-warnings 10 draft.md

Exits 1 when warnings exceed the limit. The default is inf — warnings never fail on their own, only error-severity findings do.

Next

Last updated on July 24, 2026