mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
fixed typos, added typos checking to CI
This commit is contained in:
parent
960a4fddc5
commit
314503cf7f
43 changed files with 114 additions and 101 deletions
|
@ -1973,7 +1973,7 @@ fn to_type_report<'a>(
|
|||
let region = Region::from_row_col(*row, *col);
|
||||
|
||||
let doc = alloc.stack(vec![
|
||||
alloc.reflow(r"I just started parsing a function argument type, but I encounterd two commas in a row:"),
|
||||
alloc.reflow(r"I just started parsing a function argument type, but I encountered two commas in a row:"),
|
||||
alloc.region_with_subregion(surroundings, region),
|
||||
alloc.concat(vec![alloc.reflow("Try removing one of them.")]),
|
||||
]);
|
||||
|
|
|
@ -1046,7 +1046,7 @@ fn to_pattern_report<'b>(
|
|||
let doc = alloc.stack(vec![
|
||||
alloc.text("This pattern is being used in an unexpected way:"),
|
||||
alloc.region(expr_region),
|
||||
pattern_type_comparision(
|
||||
pattern_type_comparison(
|
||||
alloc,
|
||||
found,
|
||||
expected_type,
|
||||
|
@ -1078,7 +1078,7 @@ fn to_pattern_report<'b>(
|
|||
.append(name.clone())
|
||||
.append(alloc.text(" is weird:")),
|
||||
alloc.region(region),
|
||||
pattern_type_comparision(
|
||||
pattern_type_comparison(
|
||||
alloc,
|
||||
found,
|
||||
expected_type,
|
||||
|
@ -1112,7 +1112,7 @@ fn to_pattern_report<'b>(
|
|||
.append(alloc.keyword("when"))
|
||||
.append(alloc.text(" is causing a mismatch:")),
|
||||
alloc.region(region),
|
||||
pattern_type_comparision(
|
||||
pattern_type_comparison(
|
||||
alloc,
|
||||
found,
|
||||
expected_type,
|
||||
|
@ -1144,7 +1144,7 @@ fn to_pattern_report<'b>(
|
|||
.append(alloc.keyword("when"))
|
||||
.append(alloc.text(" does not match the previous ones:")),
|
||||
alloc.region(region),
|
||||
pattern_type_comparision(
|
||||
pattern_type_comparison(
|
||||
alloc,
|
||||
found,
|
||||
expected_type,
|
||||
|
@ -1175,7 +1175,7 @@ fn to_pattern_report<'b>(
|
|||
}
|
||||
}
|
||||
|
||||
fn pattern_type_comparision<'b>(
|
||||
fn pattern_type_comparison<'b>(
|
||||
alloc: &'b RocDocAllocator<'b>,
|
||||
actual: ErrorType,
|
||||
expected: ErrorType,
|
||||
|
|
|
@ -450,11 +450,11 @@ impl<'a> RocDocAllocator<'a> {
|
|||
} else {
|
||||
ERROR_UNDERLINE.repeat((sub_region2.end_col - sub_region2.start_col) as usize)
|
||||
};
|
||||
let inbetween = " "
|
||||
let in_between = " "
|
||||
.repeat((sub_region2.start_col.saturating_sub(sub_region1.end_col)) as usize);
|
||||
|
||||
self.text(highlight1)
|
||||
.append(self.text(inbetween))
|
||||
.append(self.text(in_between))
|
||||
.append(self.text(highlight2))
|
||||
};
|
||||
|
||||
|
|
|
@ -4774,7 +4774,7 @@ mod test_reporting {
|
|||
r#"
|
||||
── DOUBLE COMMA ────────────────────────────────────────────────────────────────
|
||||
|
||||
I just started parsing a function argument type, but I encounterd two
|
||||
I just started parsing a function argument type, but I encountered two
|
||||
commas in a row:
|
||||
|
||||
1│ f : I64,,I64 -> I64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue