Skip to main content

run

Function run 

Source
pub fn run(config: &ToolConfig, document: &ParsedDocument) -> ComplianceReport
Expand description

Run every registered rule over document, applying the ignore-rules and min-confidence gates, and assemble a ComplianceReport. Mirrors core/engine.py::run’s algorithm (category/rule iteration, SkippedRule bookkeeping, format gating, the synthetic JSS-PARSE-000 “parse” category, compliance_percentage, sorted violations, severity overrides). One thing still deferred: inline suppression comments (% jss-lint: ignore [RULE-IDS]) aren’t implemented — every rule finding is reported regardless. JSS-PARSE-000 findings currently only ever come from .Rmd’s tokenizer (unterminated frontmatter/fence, malformed YAML); the tex tokenizer itself (.tex/.ltx/.rnw) never emits one — it only implements pylatexenc’s tolerant-parsing path, which never raises, unlike Python’s strict-then-tolerant-retry parse_tex_source (see tex::parse_tex_source’s doc comment).