Skip to content

Commit 2cf3068

Browse files
committed
Add ignoring lines to .typos.toml
1 parent 35bcb56 commit 2cf3068

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ extend-ignore-identifiers-re = [
1111
"typ",
1212
]
1313

14+
extend-ignore-re = [
15+
"(?Rm)^.*(#|//)\\s*typos:ignore$",
16+
]
17+
1418
[files]
1519
extend-exclude = [
1620
"docs/book/theme/highlight.js",

sway-error/src/formatting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ pub fn a_or_an<S: AsRef<str> + ?Sized>(word: &S) -> &'static str {
330330
}
331331

332332
/// Returns the ordinal suffix for the given `num`.
333-
/// The suffix is "st", "nd", "rd", or "th" depending on the value of `num`.
333+
/// Convenient for building ordinal numbers like "1st", "2nd", "3rd", "4th", etc.
334334
pub fn ord_num_suffix(num: usize) -> &'static str {
335335
match num % 100 {
336336
11..=13 => "th",
337337
_ => match num % 10 {
338338
1 => "st",
339-
2 => "nd",
339+
2 => "nd", // typos:ignore
340340
3 => "rd",
341341
_ => "th",
342342
},

0 commit comments

Comments
 (0)