MCPcopy Create free account
hub / github.com/nodejs/node / _CheckLint

Function _CheckLint

deps/v8/test/test262/PRESUBMIT.py:14–45  ·  view source on GitHub ↗
(input_api, output_api)

Source from the content-addressed store, hash-verified

12
13
14def _CheckLint(input_api, output_api):
15 root = pathlib.Path(input_api.PresubmitLocalPath())
16 vpython_spec = root / '.lint-vpython3'
17 workdir = root / 'data'
18 lint_exe = workdir / 'tools' / 'lint' / 'lint.py'
19 test_path = workdir / '..' / 'local-tests' / 'test'
20 staging_path = (test_path / 'staging').relative_to(workdir)
21 lint_exceptions = root / 'lint.exceptions'
22 command = [
23 'vpython3',
24 '-vpython-spec',
25 vpython_spec,
26 lint_exe,
27 '--exceptions',
28 lint_exceptions,
29 '--features',
30 staging_path / 'features.txt',
31 staging_path,
32 ]
33 proc = Popen(
34 command,
35 cwd=workdir,
36 stderr=STDOUT,
37 stdout=PIPE,
38 shell=platform.system() == 'Windows')
39 output, exit_code = proc.communicate()[0], proc.returncode
40 if exit_code == 0:
41 return []
42 return [
43 output_api.PresubmitError(
44 "Test262 lint failed.", long_text=output.decode())
45 ]
46
47
48def _PyUnitTest(input_api, output_api):

Callers

nothing calls this directly

Calls 2

decodeMethod · 0.65
PathMethod · 0.45

Tested by

no test coverage detected