mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Improve mach clippy, add plugins to style/util
This commit is contained in:
parent
ed894777a1
commit
3ead9cc67b
8 changed files with 28 additions and 8 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue