Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Nov 16, 2023
1 parent 7c4ef0a commit f739d95
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 47 deletions.
4 changes: 2 additions & 2 deletions src/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ complete -c just -a '(__fish_just_complete_recipes)'
pub(crate) const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[
(
r#" _arguments "${_arguments_options[@]}" \"#,
r#" local common=("#,
r" local common=(",
),
(
r"'*--set=[Override <VARIABLE> with <VALUE>]' \",
Expand Down Expand Up @@ -206,5 +206,5 @@ pub(crate) const BASH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[
fi
fi"#,
),
(r#" just)"#, r#" "$1")"#),
(r" just)", r#" "$1")"#),
];
74 changes: 37 additions & 37 deletions src/justfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,25 +711,25 @@ foo a="b\t":
}

test! {
parse_multiple,
r#"
parse_multiple,
r"
a:
b:
"#,
r#"a:
",
r"a:
b:"#,
}
b:",
}

test! {
parse_variadic,
r#"
r"
foo +a:
"#,
r#"foo +a:"#,
",
r"foo +a:",
}

test! {
Expand Down Expand Up @@ -764,43 +764,43 @@ export a := "hello"
}

test! {
parse_alias_after_target,
r#"
parse_alias_after_target,
r"
foo:
echo a
alias f := foo
"#,
r#"alias f := foo
",
r"alias f := foo
foo:
echo a"#
}
echo a"
}

test! {
parse_alias_before_target,
r#"
parse_alias_before_target,
r"
alias f := foo
foo:
echo a
"#,
r#"alias f := foo
",
r"alias f := foo
foo:
echo a"#
}
echo a"
}

test! {
parse_alias_with_comment,
r#"
parse_alias_with_comment,
r"
alias f := foo #comment
foo:
echo a
"#,
r#"alias f := foo
",
r"alias f := foo
foo:
echo a"#
}
echo a"
}

test! {
parse_complex,
Expand Down Expand Up @@ -959,20 +959,20 @@ f x="abc":
}

test! {
parameter_default_raw_string,
r#"
parameter_default_raw_string,
r"
f x='abc':
"#,
r#"f x='abc':"#,
}
",
r"f x='abc':",
}

test! {
parameter_default_backtick,
r#"
parameter_default_backtick,
r"
f x=`echo hello`:
"#,
r#"f x=`echo hello`:"#,
}
",
r"f x=`echo hello`:",
}

test! {
parameter_default_concatenation_string,
Expand Down
16 changes: 8 additions & 8 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,11 +1020,11 @@ mod tests {

test! {
name: recipe_named_alias,
text: r#"
text: r"
[private]
alias:
echo 'echoing alias'
"#,
",
tree: (justfile
(recipe alias (body ("echo 'echoing alias'")))
),
Expand Down Expand Up @@ -1154,13 +1154,13 @@ mod tests {

test! {
name: recipe_plus_variadic,
text: r#"foo +bar:"#,
text: r"foo +bar:",
tree: (justfile (recipe foo (params +(bar)))),
}

test! {
name: recipe_star_variadic,
text: r#"foo *bar:"#,
text: r"foo *bar:",
tree: (justfile (recipe foo (params *(bar)))),
}

Expand All @@ -1172,13 +1172,13 @@ mod tests {

test! {
name: recipe_variadic_variable_default,
text: r#"foo +bar=baz:"#,
text: r"foo +bar=baz:",
tree: (justfile (recipe foo (params +(bar baz)))),
}

test! {
name: recipe_variadic_addition_group_default,
text: r#"foo +bar=(baz + bob):"#,
text: r"foo +bar=(baz + bob):",
tree: (justfile (recipe foo (params +(bar ((+ baz bob)))))),
}

Expand Down Expand Up @@ -1440,9 +1440,9 @@ mod tests {

test! {
name: recipe_variadic_with_default_after_default,
text: r#"
text: r"
f a=b +c=d:
"#,
",
tree: (justfile (recipe f (params (a b) +(c d)))),
}

Expand Down

0 comments on commit f739d95

Please sign in to comment.