Revision: 354
http://sourceforge.net/p/javascriptlint/code/354
Author: matthiasmiller
Date: 2014-10-27 22:25:27 +0000 (Mon, 27 Oct 2014)
Log Message:
-----------
Allow nesting config files.
Modified Paths:
--------------
trunk/javascriptlint/conf.py
Modified: trunk/javascriptlint/conf.py
===================================================================
--- trunk/javascriptlint/conf.py 2014-10-27 22:23:26 UTC (rev 353)
+++ trunk/javascriptlint/conf.py 2014-10-27 22:25:27 UTC (rev 354)
@@ -176,6 +176,16 @@
if not self.value:
raise ConfError('Invalid JavaScript version: %s' % parm)
+class ConfSetting(Setting):
+ wants_parm = True
+ wants_dir = True
+ def __init__(self, conf):
+ self._conf = conf
+ def load(self, enabled, parm, dir):
+ if dir:
+ parm = os.path.join(dir, parm)
+ self._conf.loadfile(parm)
+
class Conf:
def __init__(self):
recurse = BooleanSetting(False)
@@ -190,6 +200,7 @@
'context': BooleanSetting(True),
'process': ProcessSetting(recurse),
'default-version': JSVersionSetting(),
+ 'conf': ConfSetting(self),
# SpiderMonkey warnings
'no_return_value': BooleanSetting(True),
'equal_as_assign': BooleanSetting(True),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|