Re-exports§
pub use config::Config;pub use config::DebtWeights;pub use config::LanguageConfig;pub use config::LayersConfig;pub use config::Strictness;pub use config::TierConfig;pub use config::builtin_language_profile;pub use reporter::JsonReporter;pub use reporter::LlmContextReporter;pub use reporter::Reporter;pub use reporter::SarifReporter;pub use reporter::TerminalReporter;
Modules§
Structs§
- Analysis
Context - Analysis context passed to plugins.
- Baseline
- A baseline is a set of finding fingerprints representing known/accepted issues.
- Class
Info - Extracted class/struct info from AST.
- Comment
Info - A comment extracted from source code by the language parser.
- Finding
- A single analysis finding.
- Function
Info - Extracted function info from AST.
- Health
Score - Per-file health score.
- Import
Info - Extracted import info.
- Location
- Source location of a finding.
- Plugin
Registry - Manages plugin registration and lifecycle.
- Project
Cache - Unified project cache: parse results + findings.
- Source
File - Raw source file content.
- Source
Model - Unified source model produced by parsing.
- TypeRef
- A function parameter’s (or return value’s) type, with resolved origin. Produced by parsers after combining AST type text with the file’s imports.
Enums§
- File
Status - Result of checking a file against cache.
- Grade
- Health grade A–F for a file, based on issue density.
- Severity
- Severity level for a finding.
- Smell
Category - Smell category from refactoring literature.
- Type
Origin - Where a referenced type is defined, from the perspective of the file that uses it. Used by abstraction-boundary analyses to distinguish “own domain” types from “pulled in from a library” types.
Traits§
- Plugin
- Core trait that all analyzers implement.
Functions§
- class_
location - Build a Location pointing at a class/struct’s name identifier.
- env_
hash - Compute environment hash from config + plugins + cha binary fingerprint.
- filter_
ignored - Filter out findings suppressed by
cha:ignorecomments in source code, and re-evaluate findings againstcha:setthreshold overrides. - findings_
json_ schema - Generate JSON Schema for the analysis output (list of findings).
- func_
location - Build a Location pointing at a function’s name identifier.
- hash_
content - Compute a content hash.
- is_
zero_ f64 - Helper for serde skip_serializing_if on f64 fields.
- is_
zero_ usize - Helper for serde skip_serializing_if on usize fields.
- prioritize_
findings - Sort findings by priority descending (most important first).
Writes the computed score back to
Finding::risk_scoreso reporters can show why a finding ranks where it does. priority = severity_weight × overshoot × compound_factor - score_
files - Compute health scores grouped by file.