Validate infra configs on presubmit

Try to parse json files on presubmit and add warning it if unable to
parse.

R=apolito@google.com

Bug: 1223923
Change-Id: I67ab4702cb9b995aace6527f4a04f1a1068db7d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3019692
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Anthony Polito <apolito@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
changes/92/3019692/2
Josip Sokcevic 4 years ago committed by LUCI CQ
parent 4256846f2a
commit 9eee47a8e9

@ -70,7 +70,9 @@ def DepotToolsPylint(input_api, output_api):
def CommonChecks(input_api, output_api, tests_to_skip_list):
input_api.SetTimeout(TEST_TIMEOUT_S)
results = []
file_filter = lambda x: x.LocalPath() == 'infra/config/recipes.cfg'
results = input_api.canned_checks.CheckJsonParses(input_api, output_api,
file_filter=file_filter)
# The tests here are assuming this is not defined, so raise an error
# if it is.

Loading…
Cancel
Save