NotSPDX

pub struct NotSPDX {}
Expand description

§What it does

Ensures that each license in a SRCINFO is a valid SPDX license expression.

§Why is this bad?

The license attribution for packages clearly defines under what license(s) a package is distributed. When not using valid SPDX license identifiers to describe the license of a package, it may be unclear what license applies for it. Unclear license attribution has implication for the reuse of the package in binary form and whether source code must be made available for it. For this reason, Arch Linux decided to only allow valid SPDX license expressions (see RFC 0016).

§Examples

pkgbase = test
    pkgver = 1.0.0
    pkgrel = 1
    arch = x86_64
    license = Apache

Use instead:

pkgbase = test
    pkgver = 1.0.0
    pkgrel = 1
    arch = x86_64
    license = Apache-2.0

Implementations§

Source§

impl NotSPDX

Source

pub fn new_boxed(_: &LintRuleConfiguration) -> Box<dyn LintRule>

Create a new, boxed instance of NotSPDX.

Trait Implementations§

Source§

impl Clone for NotSPDX

Source§

fn clone(&self) -> NotSPDX

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NotSPDX

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Documented for NotSPDX

Source§

const DOCS: &'static str = "# What it does\n\nEnsures that each license in a [SRCINFO] is a valid SPDX license expression.\n\n# Why is this bad?\n\nThe license attribution for packages clearly defines under what license(s) a package is\ndistributed. When not using valid SPDX license identifiers to describe the license of a package,\nit may be unclear what license applies for it. Unclear license attribution has implication for\nthe reuse of the package in binary form and whether source code must be made available for it.\nFor this reason, Arch Linux decided to only allow valid SPDX license expressions (see [RFC\n0016]).\n\n# Examples\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\nlicense = Apache\n```\n\nUse instead:\n\n```ini,ignore\npkgbase = test\npkgver = 1.0.0\npkgrel = 1\narch = x86_64\nlicense = Apache-2.0\n```\n\n[SRCINFO]: https://alpm.archlinux.page/specifications/SRCINFO.5.html\n[RFC 0016]: https://rfc.archlinux.page/0016-spdx-license-identifiers/"

The static doc comments on this type.
Source§

impl LintRule for NotSPDX

Return the associated links for this lint rule.

Source§

fn name(&self) -> &'static str

Returns the name of this lint rule. Read more
Source§

fn scope(&self) -> LintScope

Return the scope of this lint rule. Read more
Source§

fn level(&self) -> Level

The severity level of this lint rule. Read more
Source§

fn documentation(&self) -> String

Returns the full documentation for this lint rule. Read more
Source§

fn help_text(&self) -> String

Returns the help text for this lint rule. Read more
Source§

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 scoped_name(&self) -> String

Returns the full name of this lint by combining LintRule::scope and LintRule::name as {scope}::{name}. Read more
Source§

fn groups(&self) -> &'static [LintGroup]

Returns the static lint groups this lint rule belongs to. Read more
Source§

fn configuration_options(&self) -> &[LintRuleConfigurationOptionName]

Returns a map of configuration options used by this lint rule. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.