diff options
author | Akshay <[email protected]> | 2021-10-31 09:05:26 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2021-10-31 16:05:15 +0000 |
commit | e8c955da4cbb042e6f9b89307d143f5bfa6779fa (patch) | |
tree | 0ae4ec11fd3dc0f8b69bc0f32c08858ef23a9485 /bin/src/main.rs | |
parent | 246c69f8cfc74cf4c56fdaceaeb0562ed1f3dad5 (diff) |
add `explain` subcommand and explanations to all lints
Diffstat (limited to 'bin/src/main.rs')
-rw-r--r-- | bin/src/main.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/src/main.rs b/bin/src/main.rs index 90b79ce..31f6823 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs | |||
@@ -1,5 +1,6 @@ | |||
1 | mod config; | 1 | mod config; |
2 | mod err; | 2 | mod err; |
3 | mod explain; | ||
3 | mod fix; | 4 | mod fix; |
4 | mod lint; | 5 | mod lint; |
5 | mod traits; | 6 | mod traits; |
@@ -86,6 +87,10 @@ fn _main() -> Result<(), StatixErr> { | |||
86 | print!("{}", &*single_fix_result.src) | 87 | print!("{}", &*single_fix_result.src) |
87 | } | 88 | } |
88 | } | 89 | } |
90 | SubCommand::Explain(explain_config) => { | ||
91 | let explanation = explain::explain(explain_config.target)?; | ||
92 | println!("{}", explanation) | ||
93 | } | ||
89 | } | 94 | } |
90 | Ok(()) | 95 | Ok(()) |
91 | } | 96 | } |