pkgcheck.checks.reserved module

class pkgcheck.checks.reserved.EbuildReservedCheck(options, **kwargs)[source]

Bases: _ReservedNameCheck

Scan ebuilds for reserved function or variable names.

feed(pkg: _ParsedPkg)[source]

Handle functionality against the passed in item.

global_reserved = frozenset({'A', 'ADEPEND', 'B', 'BDEPEND', 'C', 'D', 'DDEPEND', 'E', 'EDEPEND', 'F', 'FDEPEND', 'G', 'GDEPEND', 'H', 'HDEPEND', 'I', 'IDEPEND', 'J', 'JDEPEND', 'K', 'KDEPEND', 'L', 'LDEPEND', 'M', 'MDEPEND', 'N', 'NDEPEND', 'O', 'ODEPEND', 'P', 'PDEPEND', 'Q', 'QDEPEND', 'R', 'RDEPEND', 'S', 'SDEPEND', 'T', 'TDEPEND', 'U', 'UDEPEND', 'V', 'VDEPEND', 'W', 'WDEPEND', 'X', 'XDEPEND', 'Y', 'YDEPEND', 'Z', 'ZDEPEND'})
known_results = frozenset({<class 'pkgcheck.checks.reserved.EbuildReservedName'>, <class 'pkgcheck.checks.reserved.EbuildSemiReservedName'>})
scope = <PackageScope desc='version' @0x7fc9bedc9290>
class pkgcheck.checks.reserved.EbuildReservedName(used_type: str, reserved_word: str, reserved_type: str, **kwargs)[source]

Bases: LineResult, Warning

Ebuild uses reserved variable or function name for package manager.

property desc

Result description.

name = 'EbuildReservedName'
class pkgcheck.checks.reserved.EbuildSemiReservedName(used_type: str, **kwargs)[source]

Bases: LineResult, Warning

Ebuild uses semi-reserved variable or function name.

Ebuild is using in global scope semi-reserved variable or function names, which is likely to clash with future EAPIs. Currently it include single-letter uppercase variables, and [A-Z]DEPEND variables.

property desc

Result description.

name = 'EbuildSemiReservedName'
class pkgcheck.checks.reserved.EclassReservedCheck(*args, eclass_addon)[source]

Bases: _ReservedNameCheck

Scan eclasses for reserved function or variable names.

feed(eclass: _ParsedEclass)[source]

Handle functionality against the passed in item.

known_results = frozenset({<class 'pkgcheck.checks.reserved.EclassReservedName'>})
required_addons = (<class 'pkgcheck.addons.eclass.EclassAddon'>,)
scope = <LocationScope desc='eclass' @0x7fc9bedc9610>
class pkgcheck.checks.reserved.EclassReservedName(used_name: str, used_type: str, reserved_word: str, reserved_type: str, **kwargs)[source]

Bases: EclassResult, Warning

Eclass uses reserved variable or function name for package manager.

property desc

Result description.

name = 'EclassReservedName'