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

Function _CommonChecks

deps/v8/tools/mb/PRESUBMIT.py:11–38  ·  view source on GitHub ↗
(input_api, output_api)

Source from the content-addressed store, hash-verified

9
10
11def _CommonChecks(input_api, output_api):
12 results = []
13
14 # Run Pylint over the files in the directory.
15 pylint_checks = input_api.canned_checks.GetPylint(input_api, output_api)
16 results.extend(input_api.RunTests(pylint_checks))
17
18 # Run the MB unittests.
19 results.extend(
20 input_api.canned_checks.RunUnitTestsInDirectory(input_api, output_api,
21 '.', [r'^.+_test\.py$'],
22 run_on_python2=False))
23
24 # Validate the format of the mb_config.pyl file.
25 cmd = [input_api.python3_executable, 'mb.py', 'validate']
26 kwargs = {'cwd': input_api.PresubmitLocalPath()}
27 results.extend(input_api.RunTests([
28 input_api.Command(name='mb_validate',
29 cmd=cmd, kwargs=kwargs,
30 message=output_api.PresubmitError,
31 python3=True)]))
32
33 is_mb_config = (lambda filepath: 'mb_config.pyl' in filepath.LocalPath())
34 results.extend(
35 input_api.canned_checks.CheckLongLines(
36 input_api, output_api, maxlen=80, source_file_filter=is_mb_config))
37
38 return results
39
40
41def CheckChangeOnUpload(input_api, output_api):

Callers 2

CheckChangeOnUploadFunction · 0.70
CheckChangeOnCommitFunction · 0.70

Calls 3

LocalPathMethod · 0.80
extendMethod · 0.45
CommandMethod · 0.45

Tested by

no test coverage detected