aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-12 07:29:25 -0700
committerGitHub <noreply@github.com>2016-07-12 07:29:25 -0700
commit74925460952ac070ff5e365b6fe6b886fd81861b (patch)
tree3ed21456aca89873f657b3f179861a5ae8224ec5 /python/servo
parente2e7013e7629af1b1da4b944798bee00d4eae2d2 (diff)
parent2091981db863088688d0c054618b2850ae4aae81 (diff)
downloadservo-74925460952ac070ff5e365b6fe6b886fd81861b.tar.gz
servo-74925460952ac070ff5e365b6fe6b886fd81861b.zip
Auto merge of #12409 - Manishearth:clippy, r=nox
Update clippy, improve clippy integration This makes it much easier to run rustfix on servo (rustfix is still pretty buggy though) <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12409) <!-- Reviewable:end -->
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/devenv_commands.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py
index 2619827c226..a4bfa5c5df1 100644
--- a/python/servo/devenv_commands.py
+++ b/python/servo/devenv_commands.py
@@ -94,11 +94,21 @@ class MachCommands(CommandBase):
@Command('clippy',
description='Run Clippy',
category='devenv')
- def clippy(self):
- features = "--features=script/plugins/clippy"
+ @CommandArgument(
+ '--package', '-p', default=None,
+ help='Updates the selected package')
+ @CommandArgument(
+ '--json', '-j', action="store_true",
+ help='Outputs')
+ def clippy(self, package=None, json=False):
+ params = ["--features=script/plugins/clippy"]
+ if package:
+ params += ["-p", package]
+ if json:
+ params += ["--", "-Zunstable-options", "--error-format", "json"]
with cd(path.join(self.context.topdir, "components", "servo")):
- return subprocess.call(["cargo", "build", features],
+ return subprocess.call(["cargo", "rustc", "-v"] + params,
env=self.build_env())
@Command('rustc',