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>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index ad837c9..7aba7c6 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -70,7 +70,9 @@
 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.