pub struct UnusedNamespaceMemberFinding {
pub member: UnusedMember,
pub finding_id: Option<String>,
pub actions: Vec<IssueAction>,
pub introduced: Option<AuditIntroduced>,
pub effective_severity: Option<EffectiveSeverity>,
pub reachability_caveats: Vec<ReachabilityCaveat>,
}Expand description
Wire-shape envelope for an UnusedMember finding consumed under the
unused_namespace_members key (an exported member of an exported
TypeScript namespace that no code reads). member_name is the dotted path
from the exported namespace, for example Inner.x. Emits only a
line-level suppress action: a member can be a multi-line function, class
or nested namespace, so there is no safe one-line auto-fix.
Fields§
§member: UnusedMemberThe underlying dead-code entry.
finding_id: Option<String>Stable id of this finding: dc1:<rule>:<16 hex digits>, with a
~<k> suffix when several findings of one type share an identity.
Line and column are not inputs, so the id survives line shifts,
reformats and reorders. A rename of the file or the symbol gives a
new id. Absent in output from older versions.
actions: Vec<IssueAction>Suggested next steps. Always emitted (possibly empty for forward-compat).
introduced: Option<AuditIntroduced>Set by the audit pass when this finding is introduced relative to the merge-base.
effective_severity: Option<EffectiveSeverity>Gate severity of this finding after rules and overrides[].rules
resolve for its path. CI formats read it for the annotation, SARIF
and CodeClimate level. Absent in output from older versions. Not
part of the finding identity, baseline keys or fingerprints.
reachability_caveats: Vec<ReachabilityCaveat>Advisory caveats on the verdict behind this finding. A namespace member takes the member rule unchanged: any module this run analyzed incompletely can hold the access that credits it. Sorted, deduplicated, and omitted from the wire when empty. This is disclosure only, because a namespace member offers no mutation.
Implementations§
Source§impl UnusedNamespaceMemberFinding
impl UnusedNamespaceMemberFinding
Sourcepub fn with_actions(member: UnusedMember) -> Self
pub fn with_actions(member: UnusedMember) -> Self
Build the wrapper from a raw UnusedMember. Emits only a line-level
suppress action.
Trait Implementations§
Source§impl CaveatedFinding for UnusedNamespaceMemberFinding
impl CaveatedFinding for UnusedNamespaceMemberFinding
Source§fn set_reachability_caveats(&mut self, caveats: Vec<ReachabilityCaveat>)
fn set_reachability_caveats(&mut self, caveats: Vec<ReachabilityCaveat>)
caveats and downgrade every mutating action the gate now
withholds. The field itself stays pub (a renderer test builds an
already-caveated fixture directly, without running the annotation
pass); every non-test writer goes through this setter instead of the
field so the downgrade travels with the write.Source§impl Clone for UnusedNamespaceMemberFinding
impl Clone for UnusedNamespaceMemberFinding
Source§impl Debug for UnusedNamespaceMemberFinding
impl Debug for UnusedNamespaceMemberFinding
Source§impl<'de> Deserialize<'de> for UnusedNamespaceMemberFinding
impl<'de> Deserialize<'de> for UnusedNamespaceMemberFinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl GatedFinding for UnusedNamespaceMemberFinding
impl GatedFinding for UnusedNamespaceMemberFinding
Source§fn effective_severity(&self) -> Option<EffectiveSeverity>
fn effective_severity(&self) -> Option<EffectiveSeverity>
None when no value was written.Source§fn set_effective_severity(&mut self, severity: Option<EffectiveSeverity>)
fn set_effective_severity(&mut self, severity: Option<EffectiveSeverity>)
Source§impl IdentifiedFinding for UnusedNamespaceMemberFinding
impl IdentifiedFinding for UnusedNamespaceMemberFinding
Source§fn rule_token(&self) -> &'static str
fn rule_token(&self) -> &'static str
Source§fn identity_parts(&self, p: &IdentityPaths<'_>) -> Vec<String>
fn identity_parts(&self, p: &IdentityPaths<'_>) -> Vec<String>
Source§fn tiebreak_position(&self) -> (u32, u32, u32)
fn tiebreak_position(&self) -> (u32, u32, u32)
Source§fn finding_id(&self) -> Option<&str>
fn finding_id(&self) -> Option<&str>
None before the stamping pass.Source§fn set_finding_id(&mut self, id: Option<String>)
fn set_finding_id(&mut self, id: Option<String>)
Source§fn canonical_key(&self, paths: &IdentityPaths<'_>) -> String
fn canonical_key(&self, paths: &IdentityPaths<'_>) -> String
dead_code_canonical_key.