Skip to content
Open
7 changes: 7 additions & 0 deletions csaf-rs/src/converter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mod deduplicate_x_generic_uris;
mod helpers;
mod lowercase_hash_value;
mod move_purl_into_purls_array;
mod remove_tracking_id_from_title;
mod set_csaf_21_schema;
mod set_initial_release_date;
mod settings;
Expand Down Expand Up @@ -41,6 +42,7 @@ const CONVERSIONS: &[&dyn Convert] = &[
&update_tlp_label::UpdateTlpLabel,
&update_publisher_category::UpdatePublisherCategory,
&set_initial_release_date::SetInitialReleaseDate,
&remove_tracking_id_from_title::RemoveTrackingIdFromTitle,
// conversions that move leaf nodes
&move_purl_into_purls_array::MoveSinglePurlIntoPurlsArray,
&convert_release_date_to_disclosure_date::ConvertReleaseDateToDisclosureDate,
Expand Down Expand Up @@ -73,6 +75,7 @@ pub enum Warning {
TlpIsMissingLabel,
PublisherCategoryOther,
InconsistentInitialReleaseDate { old: String, new: String },
EmptyTitleAfterTrackingIdRemoval { id: String },
PublisherContactOpenPgpKeyUrlRequiresEmail { url: String },
PublisherContactInvalidFormat { property: &'static str, value: String },
}
Expand All @@ -96,6 +99,10 @@ impl fmt::Display for Warning {
Please manually check whether the publisher category should be changed to 'multiplier'. \
The converter provides options to perform this change automatically or suppress this warning.",
),
Warning::EmptyTitleAfterTrackingIdRemoval { id } => write!(
f,
"The title would become empty after removing the tracking id `{id}` and the \
separating characters, therefore the title was left unchanged"
Warning::PublisherContactOpenPgpKeyUrlRequiresEmail { url } => write!(
f,
"The URL `{url}` in the publisher contact details was recognized as a public OpenPGP key URL, \
Expand Down
Loading
Loading