Complains about base64 string
We have some base64 encoded fixtured that trip typos:
error: `wel` should be `well`
--> modules/fedimint-ln-tests/tests/tests.rs:120:50
|
120 | cqp2rzjq0ag45qspt2vd47jvj3t5nya5vsn0hlhf5wel8h779npsrspm6eeuqtjuuqqqqgqqyqqqqqqqqqqqqqqqc9q\
| ^^^
|
Typos found: Valid new words can be added to '_typos.toml'
I'll probably figure an workaround, but maybe worth mentioning so it can be improved? Maybe typos could detect long hex/baseN strings and ignore them?
Maybe
typoscould detect long hex/baseN strings and ignore them?
Yes!!
[default]
extend-ignore-re = [
"\\b[0-9A-Za-z+/]{91}(=|==)?\\b",
]
Had to adapt this to \\b[0-9A-Za-z+/]{60}(=|==)?. Not sure why the remaining \\b did not make things work. I also saw that https://github.com/crate-ci/typos/pull/414 requires at least one + or / sign to trigger the escape. Which wasn't the case for my string: Wm4zWURqT3RVYXRTb0FHb1p4UGRrYmcKLS0tIDNFK3ZjUTZVclBaTlhFNSs5TEQ1
Which wasn't the case for my string:
Your string is 64 characters long. This configuration ignores it.
[default]
extend-ignore-re = [
"\\b[0-9A-Za-z+/]{64}(=|==)?\\b",
]
... I think you mean the built-in base64-ignoring rule.
Um no, I tried 60 chars both with and without the remaining \\b. Positive it's the cause 😊