typos identified by github.com/crate-ci/typos#3045
Conversation
drgrice1
left a comment
There was a problem hiding this comment.
I think this is okay.
I have done some testing with crate-ci/typos, and have concluded that it would not be a good idea to enable it as a work flow. In testing both with the webwork2 and PG code as well as with several other projects, I am seeing way to many false positives. So I don't think it would actually be safe to use in automated checking. It is fine to use it manually though.
| push @{ $mlt{$mltind} }, $index; | ||
| } else { | ||
| $mlt{$mltind} = [$indx]; | ||
| $mlt{$mltind} = [$index]; |
There was a problem hiding this comment.
I would say that technically this is a false positive. I suspect this was an intended short form of the $index used for the variable name. This is caught by crate-ci/typos, but $subindx below is not, and that variable was spelled that way, I think clearly, for the same reason.
In any case, if this is changed, then $subindx below should also be changed for consistency.
There was a problem hiding this comment.
This is one that I almost left alone. But I just liked the readability of index over indx. I could have added it to the _typos.toml file but I opted to replace it here. I missed subindx though. I'll get to that.
There was a problem hiding this comment.
But that is part of my issue with the whitelist. I don't think that indx should be whitelisted. In general, it would be better for the variable here to be named $index and not $indx, but it is well established that I don't like abbreviations, and some other developers do like to abbreviate.
There was a problem hiding this comment.
I agree. That's why I changed it to index instead of adding it to my local whitelist. But I am good with just making this a new annual thing, reviewing for typos this way. It's similar (but not quite as automated) as when you run the localizations.
I'm about to go change subindx too.
There was a problem hiding this comment.
s/subindx/subindex/ completed
There was a problem hiding this comment.
I think that if you (or someone) were to get a configuration setup that works okay, then it wouldn't hurt to try a workflow. The worst case scenario we decide it is isn't good and remove it.
|
Did you see how to whitelist false positives? When building up these PRs, I had a |
|
Yeah, but that seems like it would be tedious to maintain. For instance, In the file In the file In other projects I saw some really dangerous things that it was making suggestions for. For example, one project has a list of YouTube video ids, and it was suggesting changes to parts of those. In general, I think that using it for manual and double checked spell checking is good, and in fact I have enabled it as a language server in vim to get spell checking there. |
9fb9546 to
cf77a85
Compare
These are the typos from
lib/WeBWorK/ContentGenerator/. There are not as many as I thought. Maybe when I did an initial count there was something wrong with the sytnax I used.In a few places, things like variable names are changed. I believe they are changed consistently over their scope and the changes should cause no trouble. But they will lighten future scans for typos.