Module lints

Source
Expand description

Linter helper functions.

If you find yourself adding a new linting error and it’s not just a one-off but rather used in multiple places, please add a new function in this module.

All of these linter functions are designed to be used in the context of SourceInfoV1::from_raw and the functions that’re called inside it. They’re passed the errors vector that aggregates all lints/errors during the conversion from the raw to the structured data format.

Functions§

duplicate_architecture
Creates a lint error for when an architecture is specified multiple times.
missing_architecture_for_property
Creates a lint error for architecture specific properties when that architecture doesn’t exist for a given PackageBuild or Package.
non_spdx_license
Creates a lint error for when a license isn’t compliant with the SPDX format.
reassigned_cleared_property
Creates a lint error for a package property that is both set and unset.
unsafe_checksum
Creates a parse error for unsafe checksums.