aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-10-31 16:03:45 +0000
committerAkshay <[email protected]>2021-10-31 16:03:45 +0000
commit79614a9d6df02c661071f55e81bfc81da5055480 (patch)
tree0ae4ec11fd3dc0f8b69bc0f32c08858ef23a9485
parent15ccd864c8869f87a564e5ab7e923dcc2bb54340 (diff)
fix the spelling of explanationoffline-explain
-rw-r--r--bin/src/config.rs2
-rw-r--r--bin/src/explain.rs2
-rw-r--r--lib/src/lib.rs8
-rw-r--r--macros/src/explain.rs2
4 files changed, 7 insertions, 7 deletions
diff --git a/bin/src/config.rs b/bin/src/config.rs
index 7188c45..1649017 100644
--- a/bin/src/config.rs
+++ b/bin/src/config.rs
@@ -26,7 +26,7 @@ pub enum SubCommand {
26 Fix(Fix), 26 Fix(Fix),
27 /// Fix exactly one issue at provided position 27 /// Fix exactly one issue at provided position
28 Single(Single), 28 Single(Single),
29 /// Print detailed explaination for a lint warning 29 /// Print detailed explanation for a lint warning
30 Explain(Explain), 30 Explain(Explain),
31} 31}
32 32
diff --git a/bin/src/explain.rs b/bin/src/explain.rs
index c663427..6aefa7e 100644
--- a/bin/src/explain.rs
+++ b/bin/src/explain.rs
@@ -9,7 +9,7 @@ pub fn explain(code: u32) -> Result<&'static str, ExplainErr> {
9 .values() 9 .values()
10 .flatten() 10 .flatten()
11 .find(|l| l.code() == code) 11 .find(|l| l.code() == code)
12 .map(|l| l.explaination()) 12 .map(|l| l.explanation())
13 .ok_or(ExplainErr::LintNotFound(code)), 13 .ok_or(ExplainErr::LintNotFound(code)),
14 } 14 }
15} 15}
diff --git a/lib/src/lib.rs b/lib/src/lib.rs
index e6bfa6c..5347666 100644
--- a/lib/src/lib.rs
+++ b/lib/src/lib.rs
@@ -234,15 +234,15 @@ pub trait Metadata {
234 fn match_kind(&self) -> Vec<SyntaxKind>; 234 fn match_kind(&self) -> Vec<SyntaxKind>;
235} 235}
236 236
237/// Contains offline explaination for each lint 237/// Contains offline explanation for each lint
238/// The `lint` macro scans nearby doc comments for 238/// The `lint` macro scans nearby doc comments for
239/// explainations and derives this trait. 239/// explanations and derives this trait.
240/// 240///
241/// FIXME: the lint macro does way too much, maybe 241/// FIXME: the lint macro does way too much, maybe
242/// split it into smaller macros. 242/// split it into smaller macros.
243pub trait Explain { 243pub trait Explain {
244 fn explaination(&self) -> &'static str { 244 fn explanation(&self) -> &'static str {
245 "no explaination found" 245 "no explanation found"
246 } 246 }
247} 247}
248 248
diff --git a/macros/src/explain.rs b/macros/src/explain.rs
index 9bc3c29..41dc5d4 100644
--- a/macros/src/explain.rs
+++ b/macros/src/explain.rs
@@ -20,7 +20,7 @@ pub fn generate_explain_impl(struct_item: &ItemStruct) -> TokenStream2 {
20 .join("\n"); 20 .join("\n");
21 quote! { 21 quote! {
22 impl crate::Explain for #struct_name { 22 impl crate::Explain for #struct_name {
23 fn explaination(&self) -> &'static str { 23 fn explanation(&self) -> &'static str {
24 #explain 24 #explain
25 } 25 }
26 } 26 }