pub struct DuplicateArchitecture {}Expand description
§What it does
Checks that architectures (see alpm-architecture) are not specified twice.
§Why is this bad?
Duplicate alpm-architecture definitions are confusing and do not serve a purpose. Generally, duplicate definitions are ignored and therefore it is best practice to only specify an architecture once.
§Example
pkgbase = test
pkgver = 1.0.0
pkgrel = 1
arch = x86_64
arch = x86_64Use instead:
pkgbase = test
pkgver = 1.0.0
pkgrel = 1
arch = x86_64Implementations§
Source§impl DuplicateArchitecture
impl DuplicateArchitecture
Sourcepub fn new_boxed(_: &LintRuleConfiguration) -> Box<dyn LintRule>
pub fn new_boxed(_: &LintRuleConfiguration) -> Box<dyn LintRule>
Create a new, boxed instance of DuplicateArchitecture.
This is used to register the lint on the LintStore.
Trait Implementations§
Source§impl Clone for DuplicateArchitecture
impl Clone for DuplicateArchitecture
Source§fn clone(&self) -> DuplicateArchitecture
fn clone(&self) -> DuplicateArchitecture
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 DuplicateArchitecture
impl Debug for DuplicateArchitecture
Source§impl Documented for DuplicateArchitecture
impl Documented for DuplicateArchitecture
Source§const DOCS: &'static str = "# What it does\n\nChecks that architectures (see [alpm-architecture]) are not specified twice.\n\n# Why is this bad?\n\nDuplicate [alpm-architecture] definitions are confusing and do not serve a purpose.\nGenerally, duplicate definitions are ignored and therefore it is best practice to only specify\nan architecture once.\n\n# Example\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\narch = x86_64\n```\n\nUse instead:\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\n```\n\n[alpm-architecture]: https://alpm.archlinux.page/specifications/alpm-architecture.7.html"
const DOCS: &'static str = "# What it does\n\nChecks that architectures (see [alpm-architecture]) are not specified twice.\n\n# Why is this bad?\n\nDuplicate [alpm-architecture] definitions are confusing and do not serve a purpose.\nGenerally, duplicate definitions are ignored and therefore it is best practice to only specify\nan architecture once.\n\n# Example\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\narch = x86_64\n```\n\nUse instead:\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\n```\n\n[alpm-architecture]: https://alpm.archlinux.page/specifications/alpm-architecture.7.html"
The static doc comments on this type.
Source§impl LintRule for DuplicateArchitecture
impl LintRule for DuplicateArchitecture
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 DuplicateArchitecture
impl RefUnwindSafe for DuplicateArchitecture
impl Send for DuplicateArchitecture
impl Sync for DuplicateArchitecture
impl Unpin for DuplicateArchitecture
impl UnwindSafe for DuplicateArchitecture
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