5"""Analyzer specific presubmit script.
7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8for more details about the presubmit API built into gcl.
15PRESUBMIT_VERSION =
'2.0.0'
19 local_root = input_api.change.RepositoryRoot()
20 node_text_expectations_file = os.path.join(local_root,
'pkg',
'analyzer',
21 'test',
'src',
'dart',
23 'node_text_expectations.dart')
24 for git_file
in input_api.AffectedTestableFiles():
25 filename = git_file.AbsoluteLocalPath()
26 if (filename == node_text_expectations_file):
27 isEnabledLine = re.compile(
'static const updatingIsEnabled = (.*);')
28 for line
in git_file.NewContents():
29 m = isEnabledLine.search(line)
32 if (value ==
'false'):
36 output_api.PresubmitError(
37 'NodeTextExpectationsCollector.updatingIsEnabled '
41 output_api.PresubmitError(
43 'NodeTextExpectationsCollector.updatingIsEnabled')
def CheckNodeTextExpectationsCollectorUpdatingIsDisabled(input_api, output_api)