Expand description
Unified rule management - list, run, add, update, remove rules (syntax + fact).
Structs§
- List
Filters - Filters applied when listing rules via
build_list_report. - Rule
Entry - A single rule entry in a list report.
- Rule
Info Report - Structured report for
normalize rules show <id>. - Rule
Override - Common per-rule configuration fields shared across all rule engines.
- Rules
Config - Rules configuration covering all engines (syntax, fact, native, sarif).
- Rules
List Report - Report returned by
normalize rules list. - Rules
RunConfig - Configuration needed by the rules runner (extracted from NormalizeConfig).
- Rules
Tags Report - Structured report for
normalize rules tags. - Sarif
Tool - An external tool that emits SARIF 2.1.0 output (used with
--engine sarif). - TagEntry
- One entry in a
RulesTagsReport.
Enums§
- Rule
Kind - Rule type filter for list/run commands.
Functions§
- abi_
diagnostic_ to_ issue - Convert a facts-rules-api
Diagnosticinto a unifiedIssue. - add_
rule - apply_
native_ rules_ config - Apply
RulesConfigseverity/enabled overrides to issues in aDiagnosticsReport. 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
RulesListReportfrom 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
Findinginto a unifiedIssue. - format_
diagnostic - Format a diagnostic for terminal display.
- list_
tags - list_
tags_ structured - Structured variant of
list_tags— returns aRulesTagsReportinstead of a pre-formatted string. Used byrules tagsfor 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