mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-16 21:37:47 +00:00
Add proc-macro to derive CheckCodePrefix
(#1656)
IMO a derive macro is a natural way to generate new code, and it reduces the chance of merge conflicts.
This commit is contained in:
parent
2045b739a9
commit
1991d618a3
27 changed files with 530 additions and 4350 deletions
|
@ -3,10 +3,7 @@
|
|||
use anyhow::Result;
|
||||
use clap::Args;
|
||||
|
||||
use crate::{
|
||||
generate_check_code_prefix, generate_cli_help, generate_json_schema, generate_options,
|
||||
generate_rules_table,
|
||||
};
|
||||
use crate::{generate_cli_help, generate_json_schema, generate_options, generate_rules_table};
|
||||
|
||||
#[derive(Args)]
|
||||
pub struct Cli {
|
||||
|
@ -16,9 +13,6 @@ pub struct Cli {
|
|||
}
|
||||
|
||||
pub fn main(cli: &Cli) -> Result<()> {
|
||||
generate_check_code_prefix::main(&generate_check_code_prefix::Cli {
|
||||
dry_run: cli.dry_run,
|
||||
})?;
|
||||
generate_json_schema::main(&generate_json_schema::Cli {
|
||||
dry_run: cli.dry_run,
|
||||
})?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue