pub struct DeprecatedExportInUse {
pub path: PathBuf,
pub export_name: String,
pub is_type_only: bool,
pub line: u32,
pub col: u32,
pub span_start: u32,
pub deprecated_reason: Option<String>,
pub consumer_count: usize,
pub consumers: Vec<DeprecatedExportConsumer>,
pub public_api: bool,
}Expand description
An export whose leading JSDoc carries @deprecated and that still has at
least one consumer in a reachable file.
Fields§
§path: PathBufFile that declares the deprecated export.
export_name: StringName of the deprecated export.
is_type_only: boolWhether this is a type-only export.
line: u321-based line number of the export.
col: u320-based byte column offset of the export.
span_start: u32Byte offset of the export in the source file.
deprecated_reason: Option<String>Plain-text message of the @deprecated tag, capped at
DEPRECATED_REASON_MAX_CHARS characters. Absent when the tag
carries no text.
consumer_count: usizeExact number of distinct consumers: reference sites in reachable
files, one per path, line, column and kind. consumers holds the
first DEPRECATED_CONSUMER_SAMPLE_CAP of them, so the sample is
complete when this count is at most the cap.
consumers: Vec<DeprecatedExportConsumer>Consumer sample sorted by path, line, column and kind, capped at
DEPRECATED_CONSUMER_SAMPLE_CAP entries.
public_api: boolTrue when the export is part of the public API: it lives in an entry point, or a re-export chain reaches an entry point. External consumers are not visible, so the finding makes no removal claim.
Implementations§
Source§impl DeprecatedExportInUse
impl DeprecatedExportInUse
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
One-line plain-text description shared by the SARIF and CodeClimate formats.