pub struct StaticFunction {
pub name: String,
pub start_line: u32,
pub end_line: u32,
pub cyclomatic: u32,
pub static_used: bool,
pub test_covered: bool,
}Expand description
Static analysis results for a single function within a StaticFile.
Fields§
§name: StringFunction identifier as reported by the static analyzer. May be an
anonymous placeholder (e.g. "<anonymous>") when the source has no
name at the definition site.
start_line: u321-indexed line where the function body starts.
end_line: u321-indexed line where the function body ends (inclusive).
cyclomatic: u32Cyclomatic complexity of the function, as computed by the CLI.
static_used: boolWhether this function is statically referenced by the module graph.
Drives Evidence::static_status and gates Verdict::SafeToDelete.
Required: a missing field would silently default to “used” and hide
every safe_to_delete finding.
test_covered: boolWhether this function is covered by the project’s test suite.
Drives Evidence::test_coverage. Required for the same reason as
StaticFunction::static_used.
Trait Implementations§
Source§impl Clone for StaticFunction
impl Clone for StaticFunction
Source§fn clone(&self) -> StaticFunction
fn clone(&self) -> StaticFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more