Skip to main content

Module runner

Module runner 

Source
Expand description

Unified rule management - list, run, add, update, remove rules (syntax + fact).

Structs§

ListFilters
Filters applied when listing rules via build_list_report.
RuleEntry
A single rule entry in a list report.
RuleInfoReport
Structured report for normalize rules show <id>.
RuleOverride
Common per-rule configuration fields shared across all rule engines.
RulesConfig
Rules configuration covering all engines (syntax, fact, native, sarif).
RulesListReport
Report returned by normalize rules list.
RulesRunConfig
Configuration needed by the rules runner (extracted from NormalizeConfig).
RulesTagsReport
Structured report for normalize rules tags.
SarifTool
An external tool that emits SARIF 2.1.0 output (used with --engine sarif).
TagEntry
One entry in a RulesTagsReport.

Enums§

RuleKind
Rule type filter for list/run commands.

Functions§

abi_diagnostic_to_issue
Convert a facts-rules-api Diagnostic into a unified Issue.
add_rule
apply_native_rules_config
Apply RulesConfig severity/enabled overrides to issues in a DiagnosticsReport. This lets native checks (stale-summary, missing-summary, check-refs, etc.) be configured via [rules.rule."rule-id"] in normalize.toml, just like syntax rules.
build_list_report
Build a RulesListReport from the index, applying the given filters.
build_relations_from_index
Build Relations from the file index.
collect_fact_diagnostics
collect_fact_diagnostics_incremental
Collect fact rule diagnostics with optional incremental evaluation.
enable_disable
finding_to_issue
Convert a syntax-rules Finding into a unified Issue.
format_diagnostic
Format a diagnostic for terminal display.
list_tags
list_tags_structured
Structured variant of list_tags — returns a RulesTagsReport instead of a pre-formatted string. Used by rules tags for machine-readable JSON output.
remove_rule
run_rules_report
Run all rules (syntax + fact) and return a unified DiagnosticsReport.
run_sarif_tools
Run external SARIF tools and merge their output into a DiagnosticsReport. Each tool’s command is run with {root} replaced by the project root path. Tools must emit SARIF 2.1.0 JSON to stdout.
show_rule
show_rule_structured
Collect fact rule diagnostics without printing (returns raw diagnostics).
try_rules_via_daemon
Try to run rules via the daemon’s diagnostics cache.
update_rules