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

False positive for SCREAMING_SNAKE_CASE with a trailing lowercase s #916

Closed
mkatychev opened this issue Jan 31, 2024 · 2 comments
Closed

Comments

@mkatychev
Copy link

First encountered here:
https://github.com/RustCrypto/formats/blob/e55540ecc2f5950fad5bc380592df5efc6f68105/pem-rfc7468/README.md?plain=1#L43

1  D COULDa
2  D COULDd
3  D COULDs
4  D SHOULDs
5  I LOCIs
6  I OCTOPId
7  L AT_WILLs
8  L WILLs
9  T BROUGHTd
10 T BROUGHTs
11 T MUSTs
12 T WITs

The README.md above produces the output below:

$ typos README.md
error: `COUL` should be `COULD`
  --> README.md:1:6
  |
1 | 1  D COULDa
  |      ^^^^
  |
error: `COUL` should be `COULD`
  --> README.md:2:6
  |
2 | 2  D COULDd
  |      ^^^^
  |
error: `COUL` should be `COULD`
  --> README.md:3:6
  |
3 | 3  D COULDs
  |      ^^^^
  |
error: `SHOUL` should be `SHOULD`, `SHAWL`, `SHOAL`
  --> README.md:4:6
  |
4 | 4  D SHOULDs
  |      ^^^^^
  |
error: `WIL` should be `WILL`, `WELL`
  --> README.md:7:9
  |
7 | 7  L AT_WILLs
  |         ^^^
  |
error: `WIL` should be `WILL`, `WELL`
  --> README.md:8:6
  |
8 | 8  L WILLs
  |      ^^^
  |

Cases 5,6 and 9-12 seem to be handled correctly.

It seems that a lowercase letter that follows an all uppercase word not ending in T or I is split incorrectly.

@epage
Copy link
Collaborator

epage commented Jan 31, 2024

Closing in favor of #745. If there is a reason we should keep these separate, let us know!

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2024
@mkatychev
Copy link
Author

Apologies for not finding the duplicate 🙇 , I'll post my test cases there.

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

No branches or pull requests

2 participants