aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/devenv_commands.py
diff options
context:
space:
mode:
authorBrandon Fairchild <csbit32@gmail.com>2015-10-21 19:21:20 -0400
committerBrandon Fairchild <csbit32@gmail.com>2015-10-21 19:21:20 -0400
commitd1c2e79c89495902b431d0ae85ee1fdeebe8b42a (patch)
tree93898cf006e75533b9200c84f8dce479e90b4f16 /python/servo/devenv_commands.py
parent12c618450bc5639901ad499e59e7e4190097a693 (diff)
downloadservo-d1c2e79c89495902b431d0ae85ee1fdeebe8b42a.tar.gz
servo-d1c2e79c89495902b431d0ae85ee1fdeebe8b42a.zip
Add `clippy` as a command to mach
This gives mach the ability to run clippy with `./mach clippy`. Fixes #8134.
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r--python/servo/devenv_commands.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index 7c43f7b3b38..39457e0fc27 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -91,6 +91,16 @@ class MachCommands(CommandBase):
subprocess.call(["cargo", "update"] + params,
env=self.build_env())
+ @Command('clippy',
+ description='Run Clippy',
+ category='devenv')
+ def clippy(self):
+ features = "--features=script/plugins/clippy"
+
+ with cd(path.join(self.context.topdir, "components", "servo")):
+ return subprocess.call(["cargo", "build", features],
+ env=self.build_env())
+
@Command('rustc',
description='Run the Rust compiler',
category='devenv')