pkgcheck.checks.rust module¶
- class pkgcheck.checks.rust.RustCheck(options, **kwargs)[source]¶
Bases:
Check
Checks for rust related issues.
- known_results = frozenset({<class 'pkgcheck.checks.rust.SuboptimalCratesSeparator'>, <class 'pkgcheck.checks.rust.SuboptimalCratesURICall'>, <class 'pkgcheck.checks.rust.TooManyCrates'>})¶
- scope = <PackageScope desc='version' @0x7fbc5552d610>¶
- class pkgcheck.checks.rust.SuboptimalCratesSeparator(line, lineno, **kwargs)[source]¶
Bases:
LineResult
,Warning
Using
-
as name-version separator inCRATES
is suboptimal.The
CRATES
variable is a space separated list of crates. The eclass supports specifying the crate name and version asname@version
and asname-version
. The latter is suboptimal as it’s slower.It is recommended to use
pycargoebuild
0.7+ to generate newCRATES
.- property desc¶
Result description.
- name = 'SuboptimalCratesSeparator'¶
- class pkgcheck.checks.rust.SuboptimalCratesURICall(line, lineno, **kwargs)[source]¶
Bases:
LineResult
,Warning
Calling
cargo_crate_uris
withCRATES
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'¶
- class pkgcheck.checks.rust.TooManyCrates(count: int, **kwargs)[source]¶
Bases:
VersionResult
,Warning
Too many crates in
CRATES
variable.The
CRATES
variable is a space-separated list of crates. When it has more than 300 crates, it can cause performance issues for metadata generation and package manager handling. It is recommended to use a crates tarball instead.- property desc¶
Result description.
- name = 'TooManyCrates'¶