Skip to main content

Crate rulewright

Crate rulewright 

Source
Expand description

Extensible static analysis and executable engineering standards for Rust workspaces.

Modules§

llm
Machine-readable rule documentation for language-model consumers.
output
Terminal presentation shared by the library runner and CLI. Compact terminal presentation for the Rulewright CLI.
runner
Rule execution, reporting, fixing, and suppression cleanup. Rule execution, caching, reporting, fixing, and suppression cleanup.

Macros§

pack_ast_rule
Declare a Rust AST rule owned by a statically linked downstream rule pack.
pack_line_rule
Declare a Rust line rule owned by a statically linked downstream rule pack.
pack_toml_rule
Declare a TOML rule owned by a statically linked downstream rule pack.

Structs§

AstCtx
Config
Top-level rulewright configuration loaded from rulewright.toml.
ConfigError
Failure to load or resolve rulewright configuration.
ConfigRule
A rule entry enriched with resolved configuration for machine-readable reporting.
ConfigValue
JSON-compatible resolved configuration value.
DependencyRecord
Example
A code example that demonstrates a rule — used in --detail output and tests.
FileCtx
Per-file context passed to line rules with path, raw contents, and pre-split lines.
Fix
An auto-fix: replace a line range with new text.
FunctionRecord
Path
A borrowed native path with lexical operations only.
PathBuf
An owned native path with lexical operations only.
Rule
One lint rule in the language-neutral registry.
RuleInfo
Shared metadata fields common to both line and AST rules.
RuleMeta
Unified metadata for a registered rule (line or AST).
RulePack
A statically linked downstream rule pack.
RuleParam
RuleRegistry
A deterministic collection of built-in and downstream rules.
ShingleFingerprint
StringRecord
StructRecord
TomlCtx
Violation
A single lint violation reported by a rule against a file location.
WorkspaceCtx
WorkspaceManifest
WorkspaceRustFile

Enums§

ParamDefault
ParamType
RegistryError
Failure to construct a deterministic rule registry.
RuleCheck
Language-specific rule check function stored in the unified registry.
RuleFix
Language-specific fix function corresponding to RuleCheck.
RuleKind
The language and analysis context a rule operates on.
Severity

Traits§

RustLocation

Functions§

all_rules
Collect all registered rules sorted by name.
run_cli
Run the stock CLI with Rulewright’s generic built-in rules.
run_with_registry
Run the CLI with a caller-supplied registry of built-in and downstream rules.
violation
Construct a Violation without a rule tag; registry dispatch attaches the rule identifier.