aboutsummaryrefslogtreecommitdiff
path: root/bin/src/config.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-11-03 09:18:35 +0000
committerAkshay <[email protected]>2021-11-08 05:03:13 +0000
commit4e063b2abc402ac4d6902647e821978269025c7d (patch)
treea8935a5432fe86d0e5facb9ff8acc71edcb7f782 /bin/src/config.rs
parent78decf580d22fa792c19c40ace39762fb027067c (diff)
add snapshot test suitesnapshot-tests
Diffstat (limited to 'bin/src/config.rs')
-rw-r--r--bin/src/config.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/src/config.rs b/bin/src/config.rs
index 25c2a7f..d3944ac 100644
--- a/bin/src/config.rs
+++ b/bin/src/config.rs
@@ -2,17 +2,17 @@ use std::{default::Default, fmt, fs, path::PathBuf, str::FromStr};
2 2
3use crate::{dirs, err::ConfigErr}; 3use crate::{dirs, err::ConfigErr};
4 4
5use clap::Clap; 5use clap::Parser;
6use vfs::ReadOnlyVfs; 6use vfs::ReadOnlyVfs;
7 7
8#[derive(Clap, Debug)] 8#[derive(Parser, Debug)]
9#[clap(version, author, about)] 9#[clap(version, author, about)]
10pub struct Opts { 10pub struct Opts {
11 #[clap(subcommand)] 11 #[clap(subcommand)]
12 pub cmd: SubCommand, 12 pub cmd: SubCommand,
13} 13}
14 14
15#[derive(Clap, Debug)] 15#[derive(Parser, Debug)]
16pub enum SubCommand { 16pub enum SubCommand {
17 /// Lints and suggestions for the nix programming language 17 /// Lints and suggestions for the nix programming language
18 Check(Check), 18 Check(Check),
@@ -24,7 +24,7 @@ pub enum SubCommand {
24 Explain(Explain), 24 Explain(Explain),
25} 25}
26 26
27#[derive(Clap, Debug)] 27#[derive(Parser, Debug)]
28pub struct Check { 28pub struct Check {
29 /// File or directory to run check on 29 /// File or directory to run check on
30 #[clap(default_value = ".", parse(from_os_str))] 30 #[clap(default_value = ".", parse(from_os_str))]
@@ -67,7 +67,7 @@ impl Check {
67 } 67 }
68} 68}
69 69
70#[derive(Clap, Debug)] 70#[derive(Parser, Debug)]
71pub struct Fix { 71pub struct Fix {
72 /// File or directory to run fix on 72 /// File or directory to run fix on
73 #[clap(default_value = ".", parse(from_os_str))] 73 #[clap(default_value = ".", parse(from_os_str))]
@@ -127,7 +127,7 @@ impl Fix {
127 } 127 }
128} 128}
129 129
130#[derive(Clap, Debug)] 130#[derive(Parser, Debug)]
131pub struct Single { 131pub struct Single {
132 /// File to run single-fix on 132 /// File to run single-fix on
133 #[clap(parse(from_os_str))] 133 #[clap(parse(from_os_str))]
@@ -174,7 +174,7 @@ impl Single {
174 } 174 }
175} 175}
176 176
177#[derive(Clap, Debug)] 177#[derive(Parser, Debug)]
178pub struct Explain { 178pub struct Explain {
179 /// Warning code to explain 179 /// Warning code to explain
180 #[clap(parse(try_from_str = parse_warning_code))] 180 #[clap(parse(try_from_str = parse_warning_code))]