summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-11-22 22:48:57 +0100
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2012-11-22 22:48:57 +0100
commit81d6536d096154ce0d1ffd0e02849d35a2610578 (patch)
treee2e2eadb0c27c9b0e9472ebcad3d7407c0433c97
parent4cc3db2b37e3a0ee123f9c9c81aba56be543b383 (diff)
downloadportage-81d6536d096154ce0d1ffd0e02849d35a2610578.tar.gz
portage-81d6536d096154ce0d1ffd0e02849d35a2610578.tar.bz2
portage-81d6536d096154ce0d1ffd0e02849d35a2610578.zip
Automatically generate list of repoman checks.
This also reenables InheritDeprecated check, which has been disabled in commit 597826a1cabf654f9b3fff88425d04303e921577.
-rw-r--r--pym/repoman/checks.py16
1 files changed, 3 insertions, 13 deletions
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+)$')