MCPcopy Index your code
hub / github.com/nodejs/node / _CheckJSONFiles

Function _CheckJSONFiles

deps/v8/PRESUBMIT.py:540–556  ·  view source on GitHub ↗
(input_api, output_api)

Source from the content-addressed store, hash-verified

538
539
540def _CheckJSONFiles(input_api, output_api):
541 def FilterFile(affected_file):
542 return input_api.FilterSourceFile(
543 affected_file,
544 files_to_check=(r'.+\.json',))
545
546 results = []
547 for f in input_api.AffectedFiles(
548 file_filter=FilterFile, include_deletes=False):
549 with open(f.LocalPath()) as j:
550 try:
551 json.load(j)
552 except Exception as e:
553 results.append('JSON validation failed for {}. Error:\n{}'.format(
554 f.LocalPath(), e))
555
556 return [output_api.PresubmitError(r) for r in results]
557
558
559def _CheckNoexceptAnnotations(input_api, output_api):

Callers

nothing calls this directly

Calls 5

LocalPathMethod · 0.80
formatMethod · 0.65
openFunction · 0.50
loadMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…