Skip to content

Commit 80427e9

Browse files
committed
ci: fix a few typos and add check
This PR adds `_typos.toml`, which lets `typos` ignore generated data. Some filler texts are "fixed", too. It does not matter what the actual text is.
1 parent 06c21b5 commit 80427e9

File tree

9 files changed

+42
-13
lines changed

9 files changed

+42
-13
lines changed

.github/workflows/rust.yml

+6
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,9 @@ jobs:
179179
working-directory: fuzzing
180180
env:
181181
RUSTFLAGS: '-Ctarget-feature=-crt-static'
182+
183+
Typos:
184+
runs-on: ubuntu-latest
185+
steps:
186+
- uses: actions/checkout@v4
187+
- uses: crate-ci/typos@v1

_typos.toml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[default]
2+
locale = "en-us"
3+
4+
[files]
5+
extend-exclude = [
6+
# generated files
7+
"book/ethicalads-theme.css",
8+
"fuzzing/fuzz/artifacts/",
9+
"fuzzing/fuzz/corpus/",
10+
"target/",
11+
# too many false positives
12+
"testing/tests/gen_ws_tests.py",
13+
]
14+
15+
[default.extend-words]
16+
# French words
17+
exemple = "exemple"
18+
existant = "existant"
19+
# fillter words
20+
Ba = "Ba"
21+
fo = "fo"
22+
Fo = "Fo"
23+
sur = "sur"

book/src/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Hello
5454
To be noted, if one of the trimmed characters is a newline, then the only
5555
character remaining will be a newline.
5656

57-
If you want this to be the default behaviour, you can set `whitespace` to
57+
If you want this to be the default behavior, you can set `whitespace` to
5858
`"minimize"`.
5959

6060
To be noted: you can also configure `whitespace` directly into the `template`

book/src/template_syntax.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct MyTemplate {
196196

197197
However, since we'll need to define this function every time we create an
198198
instance of `MyTemplate`, it's probably not the most ideal way to associate
199-
some behaviour for our template.
199+
some behavior for our template.
200200

201201
### Static functions
202202

examples/actix-web-app/src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ enum Error {
5555
///
5656
/// The same type is used by actix-web as part of the URL, and in rinja to select what content to
5757
/// show, and also as an HTML attribute in `<html lang=`. To make it possible to use the same type
58-
/// for three diffent use cases, we use a few derive macros:
58+
/// for three different use cases, we use a few derive macros:
5959
///
6060
/// * `Default` to have a default/fallback language.
6161
/// * `Debug` is not strictly needed, but it might aid debugging.
@@ -105,7 +105,7 @@ async fn not_found_handler(req: HttpRequest) -> Result<impl Responder> {
105105
}
106106
}
107107

108-
/// The is first page your user hits does not contain language infomation, so we redirect them
108+
/// The is first page your user hits does not contain language information, so we redirect them
109109
/// to a URL that does contain the default language.
110110
#[get("/")]
111111
async fn start_handler(req: HttpRequest) -> Result<impl Responder> {
@@ -139,7 +139,7 @@ async fn index_handler(
139139
// `{% if lang !=`, the former to select the text of a specific language, e.g. in the `<title>`;
140140
// and the latter to display references to all other available languages except the currently
141141
// selected one.
142-
// The field `name` will contain the value of the query paramater of the same name.
142+
// The field `name` will contain the value of the query parameter of the same name.
143143
// In `IndexHandlerQuery` we annotated the field with `#[serde(default)]`, so if the value is
144144
// absent, an empty string is selected by default, which is visible to the user an empty
145145
// `<input type="text" />` element.

rinja/benches/escape.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn escaping(b: &mut criterion::Bencher<'_>) {
1313
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris consequat tellus sit
1414
amet ornare fermentum. Etiam nec erat ante. In at metus a orci mollis scelerisque.
1515
Sed eget ultrices turpis, at sollicitudin erat. Integer hendrerit nec magna quis
16-
venenatis. Vivamus non dolor hendrerit, vulputate velit sed, varius nunc. Quisque
16+
venenatis. Vivamus non dolor hendrerit, vulputate velit sed, various nunc. Quisque
1717
in pharetra mi. Sed ullamcorper nibh malesuada commodo porttitor. Ut scelerisque
1818
sodales felis quis dignissim. Morbi aliquam finibus justo, sit amet consectetur
1919
mauris efficitur sit amet. Donec posuere turpis felis, eu lacinia magna accumsan
@@ -34,12 +34,12 @@ fn escaping(b: &mut criterion::Bencher<'_>) {
3434
facilisis sed nibh. Aenean auctor magna sem, id rutrum metus convallis quis. Nullam non arcu
3535
dictum, lobortis erat quis, rhoncus est. Suspendisse venenatis, mi sed venenatis vehicula,
3636
tortor dolor egestas lectus, et efficitur turpis odio non augue. Integer velit sapien, dictum
37-
non egestas vitae, hendrerit sed quam. Phasellus a nunc eu erat varius imperdiet. Etiam id
37+
non egestas vitae, hendrerit sed quam. Phasellus a nunc eu erat various imperdiet. Etiam id
3838
sollicitudin turpis, vitae molestie orci. Quisque ornare magna quis metus rhoncus commodo.
3939
Phasellus non mauris velit.
4040
</p>
4141
<p>
42-
Etiam dictum tellus ipsum, nec varius quam ornare vel. Cras vehicula diam nec sollicitudin
42+
Etiam dictum tellus ipsum, nec various quam ornare vel. Cras vehicula diam nec sollicitudin
4343
ultricies. Pellentesque rhoncus sagittis nisl id facilisis. Nunc viverra convallis risus ut
4444
luctus. Aliquam vestibulum <b>efficitur massa</b>, id tempus nisi posuere a. Aliquam scelerisque
4545
elit justo. Nullam a ante felis. Cras vitae lorem eu nisi feugiat hendrerit. Maecenas vitae

rinja/benches/to-json.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const STRING_LONG: &str = r#"
7272
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris consequat tellus sit
7373
amet ornare fermentum. Etiam nec erat ante. In at metus a orci mollis scelerisque.
7474
Sed eget ultrices turpis, at sollicitudin erat. Integer hendrerit nec magna quis
75-
venenatis. Vivamus non dolor hendrerit, vulputate velit sed, varius nunc. Quisque
75+
venenatis. Vivamus non dolor hendrerit, vulputate velit sed, various nunc. Quisque
7676
in pharetra mi. Sed ullamcorper nibh malesuada commodo porttitor. Ut scelerisque
7777
sodales felis quis dignissim. Morbi aliquam finibus justo, sit amet consectetur
7878
mauris efficitur sit amet. Donec posuere turpis felis, eu lacinia magna accumsan
@@ -93,12 +93,12 @@ ac risus vitae sem molestie ullamcorper. Curabitur ligula augue, sollicitudin qu
9393
facilisis sed nibh. Aenean auctor magna sem, id rutrum metus convallis quis. Nullam non arcu
9494
dictum, lobortis erat quis, rhoncus est. Suspendisse venenatis, mi sed venenatis vehicula,
9595
tortor dolor egestas lectus, et efficitur turpis odio non augue. Integer velit sapien, dictum
96-
non egestas vitae, hendrerit sed quam. Phasellus a nunc eu erat varius imperdiet. Etiam id
96+
non egestas vitae, hendrerit sed quam. Phasellus a nunc eu erat various imperdiet. Etiam id
9797
sollicitudin turpis, vitae molestie orci. Quisque ornare magna quis metus rhoncus commodo.
9898
Phasellus non mauris velit.
9999
</p>
100100
<p>
101-
Etiam dictum tellus ipsum, nec varius quam ornare vel. Cras vehicula diam nec sollicitudin
101+
Etiam dictum tellus ipsum, nec various quam ornare vel. Cras vehicula diam nec sollicitudin
102102
ultricies. Pellentesque rhoncus sagittis nisl id facilisis. Nunc viverra convallis risus ut
103103
luctus. Aliquam vestibulum <b>efficitur massa</b>, id tempus nisi posuere a. Aliquam scelerisque
104104
elit justo. Nullam a ante felis. Cras vitae lorem eu nisi feugiat hendrerit. Maecenas vitae

rinja_derive/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl RawConfig<'_> {
337337
#[cfg_attr(feature = "config", derive(Deserialize))]
338338
#[cfg_attr(feature = "config", serde(field_identifier, rename_all = "lowercase"))]
339339
pub(crate) enum WhitespaceHandling {
340-
/// The default behaviour. It will leave the whitespace characters "as is".
340+
/// The default behavior. It will leave the whitespace characters "as is".
341341
#[default]
342342
Preserve,
343343
/// It'll remove all the whitespace characters before and after the jinja block.

rinja_derive/src/input.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl TemplateArgs {
433433
}
434434
}
435435

436-
/// Try to find the souce in the comment, in a `rinja` code block.
436+
/// Try to find the source in the comment, in a `rinja` code block.
437437
///
438438
/// This is only done if no path or source was given in the `#[template]` attribute.
439439
fn source_from_docs(

0 commit comments

Comments
 (0)