Background
LaTeX has two mature linters:
chktex (ships with TeX Live): finds suspicious constructs,
missing whitespace around math operators, etc.
lacheck (older, looser): focuses on bracket/environment
matching.
rules_latex could expose these as a latex_lint test rule that
runs the linter on a document's transitive sources and fails the
build on warnings (or on a configurable subset).
What this would look like
latex_lint(
name = "paper_lint",
document = ":paper",
linter = "chktex", # or "lacheck"
fail_on = ["1", "3", "8"], # chktex warning codes
)
Backed by an optional chktex field on latex_toolchain, similar
to biber.
Why deferred
- Linters are nice-to-have, not required for a working LaTeX build
pipeline.
- chktex isn't shipped by Tectonic, so we'd need to source binaries
for each platform — another biber-style toolchain repo with the
same Linux arm64 gap pattern.
- The signal-to-noise ratio of chktex's default output is famously
low; users would need to configure heavily.
Source: DESIGN.md §5.3.
Background
LaTeX has two mature linters:
chktex(ships with TeX Live): finds suspicious constructs,missing whitespace around math operators, etc.
lacheck(older, looser): focuses on bracket/environmentmatching.
rules_latexcould expose these as alatex_linttest rule thatruns the linter on a document's transitive sources and fails the
build on warnings (or on a configurable subset).
What this would look like
Backed by an optional
chktexfield onlatex_toolchain, similarto biber.
Why deferred
pipeline.
for each platform — another biber-style toolchain repo with the
same Linux arm64 gap pattern.
low; users would need to configure heavily.
Source: DESIGN.md §5.3.