diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2016-07-12 16:34:35 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-07-12 19:59:58 +0530 |
commit | 3ead9cc67b3955b771337e0017b88d367447ed65 (patch) | |
tree | 3515baa58f86e044a275c86eaae7baddbae1cd8c /python/servo/devenv_commands.py | |
parent | ed894777a1ccabeca318bfef4bbb739fc0bed41f (diff) | |
download | servo-3ead9cc67b3955b771337e0017b88d367447ed65.tar.gz servo-3ead9cc67b3955b771337e0017b88d367447ed65.zip |
Improve mach clippy, add plugins to style/util
Diffstat (limited to 'python/servo/devenv_commands.py')
-rw-r--r-- | python/servo/devenv_commands.py | 16 |
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', |