pub enum SourceInfoIssue {
Generic {
summary: String,
arrow_line: Option<String>,
message: String,
},
BaseField {
field_name: String,
value: String,
context: String,
architecture: Option<SystemArchitecture>,
},
PackageField {
field_name: String,
package_name: String,
value: String,
context: String,
architecture: Option<SystemArchitecture>,
},
MissingField {
field_name: String,
},
}Expand description
A specific type of SRCINFO related lint issues that may be encountered during linting.
Variants§
Generic
A generic issue that only consists of some text without any additional fields.
Use this for one-off issues that don’t fit any other “issue category”. The lint rule must take care of the formatting itself.
§Note
If you find yourself using this variant multiple times in a similar manner, consider creating a dedicated variant for that use case.
Fields
summary: StringA brief, one-line summary of the issue for display above the main error line.
This is used to populate LintIssueDisplay::summary.
arrow_line: Option<String>Additional context that can be displayed between summary and message.
This is used to populate LintIssueDisplay::arrow_line.
message: StringThe detailed message describing this issue, shown in the context section.
This can contain more specific information about what was found and where.
This is used to populate LintIssueDisplay::message.
BaseField
A lint issue on a PackageBase field.
Fields
field_name: StringThe field name which causes the issue.
Used as LintIssueDisplay::arrow_line in the form of:
in field {field_name}
value: StringThe value that causes the issue.
Used as LintIssueDisplay::message in the form of:
"{context}: {value}"
context: StringAdditional context that describes what kind of issue is found.
Used as LintIssueDisplay::message in the form of:
"{context}: {value}"
architecture: Option<SystemArchitecture>The architecture in case the field is architecture specific.
If this is set, it’ll be used as LintIssueDisplay::message in the form of:
"{context}: {value} for architecture {arch}"
PackageField
A lint issue on a field that belongs to a specific package.
Fields
field_name: StringThe field name which causes the issue.
Used as LintIssueDisplay::arrow_line in the form of:
format!("in field {field_name} for package {package_name}")
package_name: StringThe name of the package for which the issue is detected.
Used as LintIssueDisplay::arrow_line in the form of:
"in field {field_name} for package {package_name}"
value: StringThe value that causes the issue.
Used as LintIssueDisplay::message in the form of:
"{context}: {value}"
context: StringAdditional context that describes what kind of issue is found.
Used as LintIssueDisplay::message in the form of:
"{context}: {value}"
architecture: Option<SystemArchitecture>The architecture in case the field is architecture specific.
If this is set, it’ll be used as LintIssueDisplay::message in the form of:
"{context}: {value} for architecture {arch}"
MissingField
A required field is missing from the package base.
Implementations§
Trait Implementations§
Source§impl Clone for SourceInfoIssue
impl Clone for SourceInfoIssue
Source§fn clone(&self) -> SourceInfoIssue
fn clone(&self) -> SourceInfoIssue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more