Skip to content

Commit 48fc252

Browse files
committed
wip: split commands into modules
1 parent 733ce08 commit 48fc252

File tree

9 files changed

+715
-686
lines changed

9 files changed

+715
-686
lines changed

src/cli/mod.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pub fn cli_match() -> Result<()> {
225225
}
226226
}
227227
}
228-
Commands::Config => commands::config()?,
228+
Commands::Config => commands::config::run()?,
229229
}
230230

231231
Ok(())
@@ -238,7 +238,7 @@ pub(crate) fn codeowners(subcommand: &CodeownersSubcommand) -> Result<()> {
238238
path,
239239
cache_file,
240240
format,
241-
} => commands::codeowners_parse(path, cache_file.as_deref(), *format),
241+
} => commands::parse::run(path, cache_file.as_deref(), *format),
242242
CodeownersSubcommand::ListFiles {
243243
path,
244244
tags,
@@ -247,7 +247,7 @@ pub(crate) fn codeowners(subcommand: &CodeownersSubcommand) -> Result<()> {
247247
show_all,
248248
format,
249249
cache_file,
250-
} => commands::codeowners_list_files(
250+
} => commands::list_files::run(
251251
path.as_deref(),
252252
tags.as_deref(),
253253
owners.as_deref(),
@@ -260,20 +260,18 @@ pub(crate) fn codeowners(subcommand: &CodeownersSubcommand) -> Result<()> {
260260
path,
261261
format,
262262
cache_file,
263-
} => commands::codeowners_list_owners(path.as_deref(), format, cache_file.as_deref()),
263+
} => commands::list_owners::run(path.as_deref(), format, cache_file.as_deref()),
264264
CodeownersSubcommand::ListTags {
265265
path,
266266
format,
267267
cache_file,
268-
} => commands::codeowners_list_tags(path.as_deref(), format, cache_file.as_deref()),
268+
} => commands::list_tags::run(path.as_deref(), format, cache_file.as_deref()),
269269
CodeownersSubcommand::Inspect {
270270
file_path,
271271
repo,
272272
format,
273273
cache_file,
274-
} => {
275-
commands::codeowners_inspect(file_path, repo.as_deref(), format, cache_file.as_deref())
276-
}
274+
} => commands::inspect::run(file_path, repo.as_deref(), format, cache_file.as_deref()),
277275
}
278276
}
279277

0 commit comments

Comments
 (0)