pkgcheck.checks.rust module

class pkgcheck.checks.rust.RustCheck(options, **kwargs)[source]

Bases: Check

Checks for rust related issues.

feed(pkg: ParseTree)[source]

Handle functionality against the passed in item.

known_results = frozenset({<class 'pkgcheck.checks.rust.SuboptimalCratesSeparator'>, <class 'pkgcheck.checks.rust.SuboptimalCratesURICall'>})
scope = <PackageScope desc='version' @0x7f6c6d509d90>
class pkgcheck.checks.rust.SuboptimalCratesSeparator(line, lineno, **kwargs)[source]

Bases: LineResult, Warning

Using - as name-version separator in CRATES is suboptimal.

The CRATES variable is a space separated list of crates. The eclass supports specifying the crate name and version as name@version and as name-version. The latter is suboptimal as it’s slower.

It is recommended to use pycargoebuild 0.7+ to generate new CRATES.

property desc

Result description.

name = 'SuboptimalCratesSeparator'
class pkgcheck.checks.rust.SuboptimalCratesURICall(line, lineno, **kwargs)[source]

Bases: LineResult, Warning

Calling cargo_crate_uris with CRATES is suboptimal, use ${CARGO_CRATE_URIS}.

Calls to $(cargo_crate_uris) and $(cargo_crate_uris ${CRATES}) are suboptimal, and can be replaces with ${CARGO_CRATE_URIS} which is pre-computed, faster and doesn’t require sub-shell in global-scope.

property desc

Result description.

name = 'SuboptimalCratesURICall'