mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 14:20:35 +00:00
This PR adds a new `cargo xtask licenses` command for finding crates with missing license files. A number of crates were uncovered that were missing a license file, and have had the appropriate license file added. Release Notes: - N/A
28 lines
590 B
Rust
28 lines
590 B
Rust
mod tasks;
|
|
mod workspace;
|
|
|
|
use anyhow::Result;
|
|
use clap::{Parser, Subcommand};
|
|
|
|
#[derive(Parser)]
|
|
#[command(name = "cargo xtask")]
|
|
struct Args {
|
|
#[command(subcommand)]
|
|
command: CliCommand,
|
|
}
|
|
|
|
#[derive(Subcommand)]
|
|
enum CliCommand {
|
|
/// Runs `cargo clippy`.
|
|
Clippy(tasks::clippy::ClippyArgs),
|
|
Licenses(tasks::licenses::LicensesArgs),
|
|
}
|
|
|
|
fn main() -> Result<()> {
|
|
let args = Args::parse();
|
|
|
|
match args.command {
|
|
CliCommand::Clippy(args) => tasks::clippy::run_clippy(args),
|
|
CliCommand::Licenses(args) => tasks::licenses::run_licenses(args),
|
|
}
|
|
}
|