OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 from os import path |
| 6 import subprocess |
| 7 import sys |
| 8 |
| 9 scripts_path = path.dirname(path.dirname(path.abspath(__file__))) |
| 10 devtools_path = path.dirname(scripts_path) |
| 11 eslint_path = path.join(devtools_path, "devtools-node-modules", "third_party", "
node_modules", ".bin", "eslint") |
| 12 node_path = path.join(scripts_path, "local_node", "runtimes", "4.5.0", "bin", "n
ode") |
| 13 |
| 14 eslint_proc = subprocess.Popen( |
| 15 args=[node_path, eslint_path, "front_end"], |
| 16 cwd=devtools_path, |
| 17 stdout=subprocess.PIPE, |
| 18 stderr=subprocess.STDOUT) |
| 19 (eslint_proc_out, _) = eslint_proc.communicate() |
| 20 print(eslint_proc_out) |
| 21 |
| 22 if eslint_proc.returncode != 0: |
| 23 print("ERRORS DETECTED") |
| 24 sys.exit(1) |
| 25 print("No linting errors found") |
| 26 sys.exit(0) |
OLD | NEW |