Skip to content

Commit 20f2094

Browse files
committed
rename subcommands to something more descriptive
1 parent 44da60a commit 20f2094

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp-linter/src/cli/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ pub struct Cli {
5858
pub not_ignored: Option<Vec<String>>,
5959

6060
#[command(subcommand)]
61-
pub commands: Option<SubCommand>,
61+
pub commands: Option<CliCommand>,
6262
}
6363

6464
#[derive(Debug, Subcommand, Clone)]
65-
pub enum SubCommand {
65+
pub enum CliCommand {
6666
/// Display the version of cpp-linter and exit.
6767
Version,
6868
}

cpp-linter/src/run.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use log::{set_max_level, LevelFilter};
1414

1515
// project specific modules/crates
1616
use crate::clang_tools::capture_clang_tools_output;
17-
use crate::cli::{ClangParams, Cli, FeedbackInput, LinesChangedOnly, SubCommand};
17+
use crate::cli::{ClangParams, Cli, FeedbackInput, LinesChangedOnly, CliCommand};
1818
use crate::common_fs::FileFilter;
1919
use crate::logger;
2020
use crate::rest_api::{github::GithubApiClient, RestApiClient};
@@ -43,7 +43,7 @@ const VERSION: &str = env!("CARGO_PKG_VERSION");
4343
pub async fn run_main(args: Vec<String>) -> Result<()> {
4444
let cli = Cli::parse_from(args);
4545

46-
if matches!(cli.commands, Some(SubCommand::Version)) {
46+
if matches!(cli.commands, Some(CliCommand::Version)) {
4747
println!("cpp-linter v{}", VERSION);
4848
return Ok(());
4949
}

0 commit comments

Comments
 (0)