From 81d6536d096154ce0d1ffd0e02849d35a2610578 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Thu, 22 Nov 2012 22:48:57 +0100 Subject: Automatically generate list of repoman checks. This also reenables InheritDeprecated check, which has been disabled in commit 597826a1cabf654f9b3fff88425d04303e921577. --- pym/repoman/checks.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'pym/repoman') diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index 8b80214ef..fe9330cd9 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -798,19 +798,9 @@ class PortageInternalVariableAssignment(LineCheck): e = 'Assignment to variable %s' % match.group(2) e += ' on line: %d' return e - -_constant_checks = tuple(chain((c() for c in ( - EbuildHeader, EbuildWhitespace, EbuildBlankLine, EbuildQuote, - EbuildAssignment, Eapi3EbuildAssignment, EbuildUselessDodoc, - EbuildUselessCdS, EbuildNestedDie, - EbuildPatches, EbuildQuotedA, EapiDefinition, - ImplicitRuntimeDeps, - EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, NoAsNeeded, - DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue, - SrcCompileEconf, Eapi3DeprecatedFuncs, NoOffsetWithHelpers, - Eapi4IncompatibleFuncs, Eapi4GoneVars, BuiltWithUse, - PreserveOldLib, SandboxAddpredict, PortageInternal, - PortageInternalVariableAssignment, DeprecatedUseq, DeprecatedHasq)), +_base_check_classes = (InheritEclass, LineCheck, PhaseCheck) +_constant_checks = tuple(chain((v() for k, v in globals().items() + if isinstance(v, type) and issubclass(v, LineCheck) and v not in _base_check_classes), (InheritEclass(k, **kwargs) for k, kwargs in _eclass_info.items()))) _here_doc_re = re.compile(r'.*\s<<[-]?(\w+)$') -- cgit v1.2.3-1-g7c22