Rules: Keep a persistent context for token rules
This will be needed to build a clean indentation checking algorithm.
This commit is contained in:
@@ -24,7 +24,7 @@ TYPE = 'token'
|
||||
CONF = {'present': bool}
|
||||
|
||||
|
||||
def check(conf, token, prev, next):
|
||||
def check(conf, token, prev, next, context):
|
||||
if conf['present']:
|
||||
if (isinstance(token, yaml.StreamEndToken) and
|
||||
not (isinstance(prev, yaml.DocumentEndToken) or
|
||||
|
||||
Reference in New Issue
Block a user