pub struct UndefinedArchitecture {}Expand description
§What it does
Ensures that SRCINFO data only contains architecture-specific fields for declared architectures (see alpm-architecture).
§Why is this bad?
Architecture-specific fields can be used to provide overrides for a field on a specific alpm-architecture. If the architecture for an architecture-specific field is not specified in a PKGBUILD or SRCINFO, the data of the architecture-specific fields is unused. Such fields are often remnants of architecture removals in the respective PKGBUILD that were not fully cleaned up.
§Example
pkgbase = test
pkgver = 1.0.0
pkgrel = 1
arch = x86_64
# A source property for the aarch64 architecture which isn't specified above.
source_aarch64 = https://domain.tld/testing/aarch_64_test.tar.gz
source_x86_64 = https://domain.tld/testing/x86_64_test.tar.gzUse instead:
pkgbase = test
pkgver = 1.0.0
pkgrel = 1
arch = x86_64
source_x86_64 = https://domain.tld/testing/x86_64_test.tar.gzImplementations§
Source§impl UndefinedArchitecture
impl UndefinedArchitecture
Sourcepub fn new_boxed(_: &LintRuleConfiguration) -> Box<dyn LintRule>
pub fn new_boxed(_: &LintRuleConfiguration) -> Box<dyn LintRule>
Create a new, boxed instance of UndefinedArchitecture.
Trait Implementations§
Source§impl Clone for UndefinedArchitecture
impl Clone for UndefinedArchitecture
Source§fn clone(&self) -> UndefinedArchitecture
fn clone(&self) -> UndefinedArchitecture
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UndefinedArchitecture
impl Debug for UndefinedArchitecture
Source§impl Documented for UndefinedArchitecture
impl Documented for UndefinedArchitecture
Source§const DOCS: &'static str = "# What it does\n\nEnsures that [SRCINFO] data only contains architecture-specific fields for declared\narchitectures (see [alpm-architecture]).\n\n# Why is this bad?\n\nArchitecture-specific fields can be used to provide overrides for a field on a specific\n[alpm-architecture]. If the architecture for an architecture-specific field is not specified in\na [PKGBUILD] or [SRCINFO], the data of the architecture-specific fields is unused. Such fields\nare often remnants of architecture removals in the respective [PKGBUILD] that were not fully\ncleaned up.\n\n# Example\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\n# A source property for the aarch64 architecture which isn\'t specified above.\nsource_aarch64 = https://domain.tld/testing/aarch_64_test.tar.gz\nsource_x86_64 = https://domain.tld/testing/x86_64_test.tar.gz\n```\n\nUse instead:\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\nsource_x86_64 = https://domain.tld/testing/x86_64_test.tar.gz\n```\n\n[PKGBUILD]: https://man.archlinux.org/man/PKGBUILD.5\n[SRCINFO]: https://alpm.archlinux.page/specifications/SRCINFO.5.html\n[alpm-architecture]: https://alpm.archlinux.page/specifications/alpm-architecture.7.html"
const DOCS: &'static str = "# What it does\n\nEnsures that [SRCINFO] data only contains architecture-specific fields for declared\narchitectures (see [alpm-architecture]).\n\n# Why is this bad?\n\nArchitecture-specific fields can be used to provide overrides for a field on a specific\n[alpm-architecture]. If the architecture for an architecture-specific field is not specified in\na [PKGBUILD] or [SRCINFO], the data of the architecture-specific fields is unused. Such fields\nare often remnants of architecture removals in the respective [PKGBUILD] that were not fully\ncleaned up.\n\n# Example\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\n# A source property for the aarch64 architecture which isn\'t specified above.\nsource_aarch64 = https://domain.tld/testing/aarch_64_test.tar.gz\nsource_x86_64 = https://domain.tld/testing/x86_64_test.tar.gz\n```\n\nUse instead:\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\nsource_x86_64 = https://domain.tld/testing/x86_64_test.tar.gz\n```\n\n[PKGBUILD]: https://man.archlinux.org/man/PKGBUILD.5\n[SRCINFO]: https://alpm.archlinux.page/specifications/SRCINFO.5.html\n[alpm-architecture]: https://alpm.archlinux.page/specifications/alpm-architecture.7.html"
The static doc comments on this type.
Source§impl LintRule for UndefinedArchitecture
impl LintRule for UndefinedArchitecture
Source§fn documentation(&self) -> String
fn documentation(&self) -> String
Returns the full documentation for this lint rule. Read more
Source§fn run(
&self,
resources: &Resources,
issues: &mut Vec<LintIssue>,
) -> Result<(), Error>
fn run( &self, resources: &Resources, issues: &mut Vec<LintIssue>, ) -> Result<(), Error>
Executes the linting logic and appends to list of accumulated issues. Read more
Source§fn extra_links(&self) -> Option<BTreeMap<String, String>>
fn extra_links(&self) -> Option<BTreeMap<String, String>>
Returns a map of additional associated links for this lint rule. Read more
Source§fn scoped_name(&self) -> String
fn scoped_name(&self) -> String
Returns the full name of this lint by combining
LintRule::scope and LintRule::name
as {scope}::{name}. Read moreSource§fn groups(&self) -> &'static [LintGroup]
fn groups(&self) -> &'static [LintGroup]
Returns the static lint groups this lint rule belongs to. Read more
Source§fn configuration_options(&self) -> &[LintRuleConfigurationOptionName]
fn configuration_options(&self) -> &[LintRuleConfigurationOptionName]
Returns a map of configuration options used by this lint rule. Read more
Auto Trait Implementations§
impl Freeze for UndefinedArchitecture
impl RefUnwindSafe for UndefinedArchitecture
impl Send for UndefinedArchitecture
impl Sync for UndefinedArchitecture
impl Unpin for UndefinedArchitecture
impl UnwindSafe for UndefinedArchitecture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more