Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: third_party/WebKit/Source/devtools/scripts/buildbot/run_eslint.py

Issue 2486903002: DevTools: Add support for installing node and running eslint over devtools. (Closed)
Patch Set: fix node.py Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/scripts/buildbot/run_eslint.py
diff --git a/third_party/WebKit/Source/devtools/scripts/buildbot/run_eslint.py b/third_party/WebKit/Source/devtools/scripts/buildbot/run_eslint.py
new file mode 100644
index 0000000000000000000000000000000000000000..fe47e2e16f99e6cf5c1ee605b29e064abb0828cd
--- /dev/null
+++ b/third_party/WebKit/Source/devtools/scripts/buildbot/run_eslint.py
@@ -0,0 +1,26 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from os import path
+import subprocess
+import sys
+
+scripts_path = path.dirname(path.dirname(path.abspath(__file__)))
+devtools_path = path.dirname(scripts_path)
+eslint_path = path.join(devtools_path, "devtools-node-modules", "third_party", "node_modules", ".bin", "eslint")
+node_path = path.join(scripts_path, "local_node", "runtimes", "4.5.0", "bin", "node")
+
+eslint_proc = subprocess.Popen(
+ args=[node_path, eslint_path, "front_end"],
+ cwd=devtools_path,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+(eslint_proc_out, _) = eslint_proc.communicate()
+print(eslint_proc_out)
+
+if eslint_proc.returncode != 0:
+ print("ERRORS DETECTED")
+ sys.exit(1)
+print("No linting errors found")
+sys.exit(0)
« no previous file with comments | « third_party/WebKit/Source/devtools/BUILD.gn ('k') | third_party/WebKit/Source/devtools/scripts/local_node/node.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698