Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix a few typos and add check #160

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

Kijewski
Copy link
Collaborator

@Kijewski Kijewski commented Aug 30, 2024

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.

Resolves #70.

@Kijewski
Copy link
Collaborator Author

A bug in https://github.com/crate-ci/typos lets the program run forever. Investigating.

Comment on lines +21 to +25
fo = "fo"
Fo = "Fo"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never saw these two as fillers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, yes, "fo", "Fo" & "Ba" are actually not used in filler texts, but "foO", "FoO", "BaR", in casing tests. Will change the comment.

@@ -54,7 +54,7 @@ Hello
To be noted, if one of the trimmed characters is a newline, then the only
character remaining will be a newline.

If you want this to be the default behaviour, you can set `whitespace` to
If you want this to be the default behavior, you can set `whitespace` to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is british english (left) vs US english (right). Both are valid.

Copy link
Collaborator Author

@Kijewski Kijewski Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but IMHO we should stick to one locale.

I guess in a French text you would probably replace "nonante", too, even if it is valid Belgian French; as I would probably replace instances of "Jänner" ("January", Swiss) or "heuer" ("this current year", Austrian). :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah I prefer nonante, makes much more sense. Although I'm surprised by how many people know about this compared to how many people living in France know about it. 🤣

@@ -13,7 +13,7 @@ fn escaping(b: &mut criterion::Bencher<'_>) {
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris consequat tellus sit
amet ornare fermentum. Etiam nec erat ante. In at metus a orci mollis scelerisque.
Sed eget ultrices turpis, at sollicitudin erat. Integer hendrerit nec magna quis
venenatis. Vivamus non dolor hendrerit, vulputate velit sed, varius nunc. Quisque
venenatis. Vivamus non dolor hendrerit, vulputate velit sed, various nunc. Quisque
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we fixing latin too? XD

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, in all other cases "various" would be right. I hope Cicero wouldn't mind that I changed his text. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better in this case to move this text out of source code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. It's used in two places anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved.

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.
@Kijewski
Copy link
Collaborator Author

A bug in https://github.com/crate-ci/typos lets the program run forever. Investigating.

I blacklisted the fuzzed files. Reported upstream: crate-ci/typos#1088.

@GuillaumeGomez
Copy link
Contributor

Looks good! I'm quite happy that moving the lorem ipsum out of the code allowed to remove a duplicate. Unexpected benefits. :D

@GuillaumeGomez GuillaumeGomez merged commit a84fa6f into rinja-rs:master Aug 30, 2024
34 checks passed
@Kijewski Kijewski deleted the pr-typos branch August 30, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add typo check in CI
2 participants