Repository: casey/just
Pull request #1204 (2022-05-29 02:05:39)

Fix a bunch of typos
Thank you https://github.com/crate-ci/typos!


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6fc9bdd9..b5969fc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -627,7 +627,7 @@ Changelog
 - Avoid fs::canonicalize (#539)
 
 ### Misc
-- Mention `set shell` as altenative to installing `sh` (#533)
+- Mention `set shell` as alternative to installing `sh` (#533)
 - Refactor Compilation error to contain a Token (#535)
 - Move lexer comment (#536)
 - Add missing `--init` test (#543)
diff --git a/justfile b/justfile
index aafcb0b4..ec454ba4 100755
--- a/justfile
+++ b/justfile
@@ -33,7 +33,7 @@ build:
 fmt:
   cargo fmt --all
 
-watch +COMMAND='ltest':
+watch +COMMAND='test':
   cargo watch --clear --exec "{{COMMAND}}"
 
 man:
diff --git a/src/analyzer.rs b/src/analyzer.rs
index 8ded49b7..4006dafb 100644
--- a/src/analyzer.rs
+++ b/src/analyzer.rs
@@ -295,7 +295,7 @@ mod tests {
   }
 
   analysis_error! {
-    name:   parameter_shadows_varible,
+    name:   parameter_shadows_variable,
     input:  "foo := \"h\"\na foo:",
     offset:  13,
     line:   1,
diff --git a/src/assignment_resolver.rs b/src/assignment_resolver.rs
index e1f50c4c..645ec848 100644
--- a/src/assignment_resolver.rs
+++ b/src/assignment_resolver.rs
@@ -101,7 +101,7 @@ impl<'src: 'run, 'run> AssignmentResolver<'src, 'run> {
           self.resolve_expression(c)
         }
       },
-      Expression::Concatination { lhs, rhs } => {
+      Expression::Concatenation { lhs, rhs } => {
         self.resolve_expression(lhs)?;
         self.resolve_expression(rhs)
       }
diff --git a/src/config.rs b/src/config.rs
index a10826b2..7dd68470 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -665,7 +665,7 @@ mod tests {
     let app = Config::app();
     let matches = app
       .get_matches_from_safe(arguments)
-      .expect("agument parsing failed");
+      .expect("argument parsing failed");
     let have = Config::from_matches(&matches).expect("config parsing failed");
     assert_eq!(have, want);
   }
@@ -702,7 +702,7 @@ mod tests {
 
         let app = Config::app();
 
-        let matches = app.get_matches_from_safe(arguments).expect("Matching failes");
+        let matches = app.get_matches_from_safe(arguments).expect("Matching fails");
 
         match Config::from_matches(&matches).expect_err("config parsing succeeded") {
           $error => { $($check)? }
diff --git a/src/evaluator.rs b/src/evaluator.rs
index 8d654bff..10aaba8e 100644
--- a/src/evaluator.rs
+++ b/src/evaluator.rs
@@ -150,7 +150,7 @@ impl<'src, 'run> Evaluator<'src, 'run> {
           Ok(self.run_backtick(contents, token)?)
         }
       }
-      Expression::Concatination { lhs, rhs } => {
+      Expression::Concatenation { lhs, rhs } => {
         Ok(self.evaluate_expression(lhs)? + &self.evaluate_expression(rhs)?)
       }
       Expression::Conditional {
diff --git a/src/expression.rs b/src/expression.rs
index 4354ab24..8b849587 100644
--- a/src/expression.rs
+++ b/src/expression.rs
@@ -16,7 +16,7 @@ pub(crate) enum Expression<'src> {
   /// `name(arguments)`
   Call { thunk: Thunk<'src> },
   /// `lhs + rhs`
-  Concatination {
+  Concatenation {
     lhs: Box<Expression<'src>>,
     rhs: Box<Expression<'src>>,
   },
@@ -46,7 +46,7 @@ impl<'src> Display for Expression<'src> {
   fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
     match self {
       Expression::Backtick { token, .. } => write!(f, "{}", token.lexeme()),
-      Expression::Concatination { lhs, rhs } => write!(f, "{} + {}", lhs, rhs),
+      Expression::Concatenation { lhs, rhs } => write!(f, "{} + {}", lhs, rhs),
       Expression::Conditional {
         lhs,
         rhs,
@@ -79,7 +79,7 @@ impl<'src> Serialize for Expression<'src> {
         seq.end()
       }
       Self::Call { thunk } => thunk.serialize(serializer),
-      Self::Concatination { lhs, rhs } => {
+      Self::Concatenation { lhs, rhs } => {
         let mut seq = serializer.serialize_seq(None)?;
         seq.serialize_element("concatinate")?;
         seq.serialize_element(lhs)?;
diff --git a/src/justfile.rs b/src/justfile.rs
index 718f2fd0..4dadb786 100644
--- a/src/justfile.rs
+++ b/src/justfile.rs
@@ -970,7 +970,7 @@ f x=`echo hello`:
   }
 
   test! {
-    parameter_default_concatination_string,
+    parameter_default_concatenation_string,
     r#"
 f x=(`echo hello` + "foo"):
 "#,
@@ -978,7 +978,7 @@ f x=(`echo hello` + "foo"):
   }
 
   test! {
-    parameter_default_concatination_variable,
+    parameter_default_concatenation_variable,
     r#"
 x := "10"
 f y=(`echo hello` + x) +z="foo":
@@ -1000,7 +1000,7 @@ f y=(`echo hello` + x) +z=("foo" + "bar"):"#,
   }
 
   test! {
-    concatination_in_group,
+    concatenation_in_group,
     "x := ('0' + '1')",
     "x := ('0' + '1')",
   }
diff --git a/src/lexer.rs b/src/lexer.rs
index 54be8658..ee9751ba 100644
--- a/src/lexer.rs
+++ b/src/lexer.rs
@@ -1107,7 +1107,7 @@ mod tests {
   }
 
   test! {
-    name:   export_concatination,
+    name:   export_concatenation,
     text:   "export foo = 'foo' + 'bar'",
     tokens: (
       Identifier:"export",
diff --git a/src/node.rs b/src/node.rs
index adba4020..58c5cf15 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -1,6 +1,6 @@
 use crate::common::*;
 
-/// Methods commmon to all AST nodes. Currently only used in parser unit tests.
+/// Methods common to all AST nodes. Currently only used in parser unit tests.
 pub(crate) trait Node<'src> {
   /// Construct an untyped tree of atoms representing this Node. This function,
   /// and `Tree` type, are only used in parser unit tests.
@@ -52,7 +52,7 @@ impl<'src> Node<'src> for Assignment<'src> {
 impl<'src> Node<'src> for Expression<'src> {
   fn tree(&self) -> Tree<'src> {
     match self {
-      Expression::Concatination { lhs, rhs } => Tree::atom("+").push(lhs.tree()).push(rhs.tree()),
+      Expression::Concatenation { lhs, rhs } => Tree::atom("+").push(lhs.tree()).push(rhs.tree()),
       Expression::Conditional {
         lhs,
         rhs,
diff --git a/src/parser.rs b/src/parser.rs
index cbefc1ad..a8c5e8da 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -40,7 +40,7 @@ impl<'tokens, 'src> Parser<'tokens, 'src> {
     Self::new(tokens).parse_ast()
   }
 
-  /// Construct a new Paser from a token stream
+  /// Construct a new Parser from a token stream
   fn new(tokens: &'tokens [Token<'src>]) -> Parser<'tokens, 'src> {
     Parser {
       next: 0,
@@ -399,7 +399,7 @@ impl<'tokens, 'src> Parser<'tokens, 'src> {
       if self.accepted(Plus)? {
         let lhs = Box::new(value);
         let rhs = Box::new(self.parse_expression()?);
-        Ok(Expression::Concatination { lhs, rhs })
+        Ok(Expression::Concatenation { lhs, rhs })
       } else {
         Ok(value)
       }
@@ -1107,7 +1107,7 @@ mod tests {
   }
 
   test! {
-    name: recipe_dependency_argument_concatination,
+    name: recipe_dependency_argument_concatenation,
     text: "foo: (bar 'a' + 'b' 'c' + 'd')",
     tree: (justfile (recipe foo (deps (bar (+ 'a' 'b') (+ 'c' 'd'))))),
   }
@@ -1341,7 +1341,7 @@ mod tests {
   }
 
   test! {
-    name: parameter_default_concatination_variable,
+    name: parameter_default_concatenation_variable,
     text: r#"
       x := "10"
 
@@ -1636,7 +1636,7 @@ mod tests {
   }
 
   test! {
-    name: parameter_default_concatination_string,
+    name: parameter_default_concatenation_string,
     text: r#"
       f x=(`echo hello` + "foo"):
     "#,
@@ -1644,7 +1644,7 @@ mod tests {
   }
 
   test! {
-    name: concatination_in_group,
+    name: concatenation_in_group,
     text: "x := ('0' + '1')",
     tree: (justfile (assignment x ((+ "0" "1")))),
   }
@@ -1823,7 +1823,7 @@ mod tests {
   }
 
   test! {
-    name: conditional_concatinations,
+    name: conditional_concatenations,
     text: "a := if b0 + b1 == c0 + c1 { d0 + d1 } else { e0 + e1 }",
     tree: (justfile (assignment a (if (+ b0 b1) == (+ c0 c1) (+ d0 d1) (+ e0 e1)))),
   }
@@ -2039,7 +2039,7 @@ mod tests {
   }
 
   error! {
-    name:   concatination_in_default,
+    name:   concatenation_in_default,
     input:  "foo a=c+d e:",
     offset: 10,
     line:   0,
diff --git a/src/summary.rs b/src/summary.rs
index 52c50230..66bdad77 100644
--- a/src/summary.rs
+++ b/src/summary.rs
@@ -185,7 +185,7 @@ pub enum Expression {
     name: String,
     arguments: Vec<Expression>,
   },
-  Concatination {
+  Concatenation {
     lhs: Box<Expression>,
     rhs: Box<Expression>,
   },
@@ -249,7 +249,7 @@ impl Expression {
           arguments: vec![Expression::new(a), Expression::new(b), Expression::new(c)],
         },
       },
-      Concatination { lhs, rhs } => Expression::Concatination {
+      Concatenation { lhs, rhs } => Expression::Concatenation {
         lhs: Box::new(Expression::new(lhs)),
         rhs: Box::new(Expression::new(rhs)),
       },
diff --git a/src/variables.rs b/src/variables.rs
index 68310c5e..e56a278b 100644
--- a/src/variables.rs
+++ b/src/variables.rs
@@ -53,7 +53,7 @@ impl<'expression, 'src> Iterator for Variables<'expression, 'src> {
           self.stack.push(lhs);
         }
         Expression::Variable { name, .. } => return Some(name.token()),
-        Expression::Concatination { lhs, rhs } => {
+        Expression::Concatenation { lhs, rhs } => {
           self.stack.push(rhs);
           self.stack.push(lhs);
         }
diff --git a/src/verbosity.rs b/src/verbosity.rs
index 51b9b9c9..b7acdc28 100644
--- a/src/verbosity.rs
+++ b/src/verbosity.rs
@@ -9,8 +9,8 @@ pub(crate) enum Verbosity {
 }
 
 impl Verbosity {
-  pub(crate) fn from_flag_occurrences(flag_occurences: u64) -> Self {
-    match flag_occurences {
+  pub(crate) fn from_flag_occurrences(flag_occurrences: u64) -> Self {
+    match flag_occurrences {
       0 => Taciturn,
       1 => Loquacious,
       _ => Grandiloquent,


Test patch:
diff --git a/tests/fmt.rs b/tests/fmt.rs
index 9dfdb8e4..9da74ed9 100644
--- a/tests/fmt.rs
+++ b/tests/fmt.rs
@@ -917,7 +917,7 @@ test! {
 }
 
 test! {
-  name: group_recipies,
+  name: group_recipes,
   justfile: "
     foo:
         echo foo
diff --git a/tests/misc.rs b/tests/misc.rs
index c707454d..cdf14e99 100644
--- a/tests/misc.rs
+++ b/tests/misc.rs
@@ -1680,7 +1680,7 @@ foo x='bar':
 }
 
 test! {
-   name:     default_concatination,
+   name:     default_concatenation,
    justfile: "
 foo x=(`echo foo` + 'bar'):
   echo {{x}}