Skip to content

Add typos of align, allocate, block, docker, given#1815

Merged
peternewman merged 10 commits into
codespell-project:masterfrom
bl-ue:patch-1
Dec 15, 2020
Merged

Add typos of align, allocate, block, docker, given#1815
peternewman merged 10 commits into
codespell-project:masterfrom
bl-ue:patch-1

Conversation

@bl-ue

@bl-ue bl-ue commented Dec 8, 2020

Copy link
Copy Markdown
Contributor

With -ing and -ed form

Comment thread codespell_lib/data/dictionary.txt
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt Outdated
@bl-ue

bl-ue commented Dec 9, 2020

Copy link
Copy Markdown
Contributor Author

@lurch done, PTAL.

Comment thread codespell_lib/data/dictionary.txt Outdated
@lurch

lurch commented Dec 9, 2020

Copy link
Copy Markdown
Contributor

You need to fix the sorting of the entries to make the CI tests happy 😉

@bl-ue

bl-ue commented Dec 9, 2020

Copy link
Copy Markdown
Contributor Author

Fixed CI issues. @lurch @larsoner PTAL.

Comment thread codespell_lib/data/dictionary.txt
@lurch

lurch commented Dec 10, 2020

Copy link
Copy Markdown
Contributor

Apart from the small query about dockerd appearing in the main dictionary, this LGTM now 👍

@bl-ue

bl-ue commented Dec 10, 2020

Copy link
Copy Markdown
Contributor Author

@larson #1815 (comment)

@lurch

lurch commented Dec 10, 2020

Copy link
Copy Markdown
Contributor

(@bl-ue But just to clarify - my query may be totally invalid... I can never remember how all the different dictionaries are supposed to work together 😉 )

@bl-ue

bl-ue commented Dec 10, 2020

Copy link
Copy Markdown
Contributor Author

@lurch what about macosx:

and Mozilla:

mazilla->Mozilla

which are in the main dictionary?

@lurch

lurch commented Dec 10, 2020

Copy link
Copy Markdown
Contributor

It's hard to imagine a normal word that maxosx or mazilla would correct to in non-code-usage.
But IMHO it's entirely plausible that dockerd might be considered a typo for docker or docked in regular language usage? 🤷

@bl-ue

bl-ue commented Dec 10, 2020

Copy link
Copy Markdown
Contributor Author

Good point. So instead I'll add dockerd as a possible replacment for docked, etc. WDYT?

@lurch

lurch commented Dec 10, 2020

Copy link
Copy Markdown
Contributor

I've got no absolutely no idea what the "correct" action is in this situation. ping @larsoner @peternewman @sebweb3r

@sebweb3r

Copy link
Copy Markdown
Contributor

There is (from my understanding) no better fitting dictionary.
One solution could be
dcokerd->dockerd, docked, docker,
in the main dictionary and
dockerd->docker, docked,
in the code dictionary (contains all checks that would be annoying with code)
However, the main dictionary is not allowed to correct to something, that is a mistake
in the code dictionary (i don't know why).

"Correct" solutions can only be provided by the other two mentioned.

@peternewman

Copy link
Copy Markdown
Collaborator

It's hard to imagine a normal word that maxosx or mazilla would correct to in non-code-usage.
But IMHO it's entirely plausible that dockerd might be considered a typo for docker or docked in regular language usage?

Again it doesn't matter; ALL we care about is that the typo isn't a valid word in some context, then it gets shunted out to another dictionary (see also rare e.g. chancel->chance, running that across a religious document would cause chaos, they aren't currently a big enough market so we just pop it in rare and hopefully people are careful or only turn on rare if they are). We wouldn't put e.g. macos->macros in the main dictionary as it would make a mess, it would go in code so only people not writing "code" would get that correction with hopefully no unintended consequences.

There is (from my understanding) no better fitting dictionary.
One solution could be
dcokerd->dockerd, docked, docker,
in the main dictionary and
dockerd->docker, docked,
in the code dictionary (contains all checks that would be annoying with code)

I think the only downside of this is we don't currently chain dictionaries (see also e.g. #1672), although as long as there is more than one correction in the main one (i,e. it duplicates the corrections from either side of the code one) it shouldn't have any negative side effects.

However, the main dictionary is not allowed to correct to something, that is a mistake
in the code dictionary (i don't know why).

We just need to add this commit back in (or make an equivalent edit):
fc203b4

The list of correcting to a typo in another dictionary is kept as small as practically possible because you shouldn't generally be correcting to a word that is itself a typo in another dictionary, instead you should correct directly to the final correction. The exceptions are allowed where required. The obvious case being colur->colour in the main dictionary and colour->color in GB to US is obviously acceptable and intended.

If anyone can word this in a more friendly way and put it in a readme would be great as it and similar variations do seem to keep coming up. Or better descriptions for the various dictionaries. Or do we just need a note about it generally only being the typo side of the dictionary we care about (apart from GB to US).

@peternewman peternewman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A few more comments

Comment thread codespell_lib/data/dictionary.txt
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt
@bl-ue

bl-ue commented Dec 11, 2020

Copy link
Copy Markdown
Contributor Author

@lurch @sebweb3r @peternewman done @ 307fe9e, PTAL.

@bl-ue bl-ue requested a review from peternewman December 11, 2020 12:59
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt
Comment thread codespell_lib/data/dictionary.txt Outdated
Comment thread codespell_lib/data/dictionary.txt Outdated
@bl-ue

bl-ue commented Dec 15, 2020

Copy link
Copy Markdown
Contributor Author

@peternewman review?

@peternewman peternewman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM thanks @bl-ue

@peternewman peternewman merged commit 0c00995 into codespell-project:master Dec 15, 2020
@bl-ue bl-ue deleted the patch-1 branch December 15, 2020 15:52
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.

4 participants