From 3ead9cc67b3955b771337e0017b88d367447ed65 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 12 Jul 2016 16:34:35 +0530 Subject: Improve mach clippy, add plugins to style/util --- python/servo/devenv_commands.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'python/servo/devenv_commands.py') 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', -- cgit v1.2.3