Commit 9eee47a8 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

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: 's avatarAnthony Polito <apolito@google.com>
parent 4256846f
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment