Package repoman :: Module checks
[hide private]

Module checks

source code

This module contains functions used in Repoman to ascertain the quality and correctness of an ebuild.

Classes [hide private]
  LineCheck
Run a check on a line of an ebuild.
  PhaseCheck
basic class for function detection
  EbuildHeader
Ensure ebuilds have proper headers Copyright header errors CVS header errors License header errors
  EbuildWhitespace
Ensure ebuilds have proper whitespacing
  EbuildBlankLine
  EbuildQuote
Ensure ebuilds have valid quoting around things like D,FILESDIR, etc...
  EbuildAssignment
Ensure ebuilds don't assign to readonly variables.
  Eapi3EbuildAssignment
Ensure ebuilds don't assign to readonly EAPI 3-introduced variables.
  EbuildNestedDie
Check ebuild for nested die statements (die statements in subshells)
  EbuildUselessDodoc
Check ebuild for useless files in dodoc arguments.
  EbuildUselessCdS
Check for redundant cd ${S} statements
  EapiDefinition
Check that EAPI assignment conforms to PMS section 7.3.1 (first non-comment, non-blank line).
  EbuildPatches
Ensure ebuilds use bash arrays for PATCHES to ensure white space safety
  EbuildQuotedA
Ensure ebuilds have no quoting around ${A}
  NoOffsetWithHelpers
Check that the image location, the alternate root offset, and the offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with helpers
  ImplicitRuntimeDeps
Detect the case where DEPEND is set and RDEPEND is unset in the ebuild, since this triggers implicit RDEPEND=$DEPEND assignment (prior to EAPI 4).
  InheritDeprecated
Check if ebuild directly or indirectly inherits a deprecated eclass.
  InheritEclass
Base class for checking for missing inherits, as well as excess inherits.
  EMakeParallelDisabled
Check for emake -j1 calls which disable parallelization.
  EMakeParallelDisabledViaMAKEOPTS
Check for MAKEOPTS=-j1 that disables parallelization.
  NoAsNeeded
Check for calls to the no-as-needed function.
  PreserveOldLib
Check for calls to the deprecated preserve_old_lib function.
  SandboxAddpredict
Check for calls to the addpredict function.
  DeprecatedBindnowFlags
Check for calls to the deprecated bindnow-flags function.
  WantAutoDefaultValue
Check setting WANT_AUTO* to latest (default value).
  SrcCompileEconf
  SrcUnpackPatches
  BuiltWithUse
  DeprecatedUseq
Checks for use of the deprecated useq function
  DeprecatedHasq
Checks for use of the deprecated hasq function
  UndefinedSrcPrepareSrcConfigurePhases
  Eapi3DeprecatedFuncs
  UndefinedPkgPretendPhase
  Eapi4IncompatibleFuncs
  Eapi4GoneVars
  PortageInternal
  PortageInternalVariableAssignment
Functions [hide private]
 
_init(experimental_inherit=False) source code
 
run_checks(contents, pkg) source code
Variables [hide private]
  _eclass_eapi_functions = {"usex": lambda eapi: eapi not in("0"...
  _eclass_export_functions = (u'ant-tasks', u'apache-2', u'apach...
  _eclass_info = {u'autotools': {u'comprehensive': True, u'exemp...
  _base_check_classes = (<class 'repoman.checks.InheritEclass'>,...
  _constant_checks = None
hash(x)
  _here_doc_re = re.compile(r'.*\s<<-?(\w+)$')
  _ignore_comment_re = re.compile(r'^\s*#')
  __package__ = 'repoman'

Imports: codecs, chain, re, time, errors, portage, eapi_supports_prefix, eapi_has_implicit_rdepend, eapi_has_src_prepare_and_src_configure, eapi_has_dosed_dohard, eapi_exports_AA, eapi_has_pkg_pretend


Variables Details [hide private]

_eclass_eapi_functions

Value:
{"usex": lambda eapi: eapi not in("0", "1", "2", "3", "4", "4-python",\
 "4-slot-abi")}

_eclass_export_functions

Value:
(u'ant-tasks',
 u'apache-2',
 u'apache-module',
 u'aspell-dict',
 u'autotools-utils',
 u'base',
 u'bsdmk',
 u'cannadic',
...

_eclass_info

Value:
{u'autotools': {u'comprehensive': True,
                u'exempt_eclasses': (u'git',
                                     u'git-2',
                                     u'subversion',
                                     u'autotools-utils'),
                u'funcs': (u'eaclocal',
                           u'eautoconf',
                           u'eautoheader',
...

_base_check_classes

Value:
(<class 'repoman.checks.InheritEclass'>,
 <class 'repoman.checks.LineCheck'>,
 <class 'repoman.checks.PhaseCheck'>)