aboutsummaryrefslogtreecommitdiff
path: root/bin/src/explain.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-11-06 09:21:55 +0000
committerAkshay <[email protected]>2021-11-06 09:21:55 +0000
commit324a333e671ed521138ad50fe463ed187874176e (patch)
tree8f294a109955881a14dbbb2bc088f14255fad687 /bin/src/explain.rs
parent63eba9d5c697e466d952588568719d0de1244ae4 (diff)
introducing "streaming" option to check, fix and single
Diffstat (limited to 'bin/src/explain.rs')
-rw-r--r--bin/src/explain.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/src/explain.rs b/bin/src/explain.rs
index 6aefa7e..de171aa 100644
--- a/bin/src/explain.rs
+++ b/bin/src/explain.rs
@@ -13,3 +13,14 @@ pub fn explain(code: u32) -> Result<&'static str, ExplainErr> {
13 .ok_or(ExplainErr::LintNotFound(code)), 13 .ok_or(ExplainErr::LintNotFound(code)),
14 } 14 }
15} 15}
16
17pub mod main {
18
19 use crate::{config::Explain as ExplainConfig, err::StatixErr};
20
21 pub fn main(explain_config: ExplainConfig) -> Result<(), StatixErr> {
22 let explanation = super::explain(explain_config.target)?;
23 println!("{}", explanation);
24 Ok(())
25 }
26}