Improve mach clippy, add plugins to style/util

This commit is contained in:
Manish Goregaokar 2016-07-12 16:34:35 +05:30
parent ed894777a1
commit 3ead9cc67b
8 changed files with 28 additions and 8 deletions

View file

@ -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',