mirror of
https://github.com/servo/servo.git
synced 2025-06-13 19:04:30 +00:00
Add clippy
as a command to mach
This gives mach the ability to run clippy with `./mach clippy`. Fixes #8134.
This commit is contained in:
parent
12c618450b
commit
d1c2e79c89
1 changed files with 10 additions and 0 deletions
|
@ -91,6 +91,16 @@ class MachCommands(CommandBase):
|
||||||
subprocess.call(["cargo", "update"] + params,
|
subprocess.call(["cargo", "update"] + params,
|
||||||
env=self.build_env())
|
env=self.build_env())
|
||||||
|
|
||||||
|
@Command('clippy',
|
||||||
|
description='Run Clippy',
|
||||||
|
category='devenv')
|
||||||
|
def clippy(self):
|
||||||
|
features = "--features=script/plugins/clippy"
|
||||||
|
|
||||||
|
with cd(path.join(self.context.topdir, "components", "servo")):
|
||||||
|
return subprocess.call(["cargo", "build", features],
|
||||||
|
env=self.build_env())
|
||||||
|
|
||||||
@Command('rustc',
|
@Command('rustc',
|
||||||
description='Run the Rust compiler',
|
description='Run the Rust compiler',
|
||||||
category='devenv')
|
category='devenv')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue