You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, I love codespell and have managed to get it adopted across the biotech company I work at. We use lots of chemicals and their abbreviations. For example, Acetonitrile is commonly called "ACN".
One design philosophy of readable code is having one's code mirror the way one speaks. For example, a chemist might say "flush the chamber with ACN," so a readable code representation might be instrument.flush_chamber(Fluids.ACN).
I have observed codespell tends to flag acronyms like ACN. From #1578 (comment), the current solution is to pass an allow list of lowercase'd acronyms:
[codespell]
ignore-words-list = acn
Currently, I have a steadily growing allow-list of chemical acronyms, which is a perfectly viable solution.
Question
What is codespell's stance on technical acronyms? Is there an alternate way of handling a steadily increasing number of technical acronyms (referring to various chemicals)?
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Any misspelled word could ba a valid acronym. I don't really see a solution here, except maintaining your own dictionary of acronyms specific to your domain. Note that acronyms to skip can be added to a file for easier maintenance of the list.
I know that codespell lowercases everything to avoid the combinatorial explosion of spelling possibilities. Perhaps there is some way to selectively ignore CONSTANT_CASE variable declarations, but I can't think of a good heuristic right now.
Anyways, my question is answered, so I will close this out! Feel free to re-open if desired.
Background
Firstly, I love codespell and have managed to get it adopted across the biotech company I work at. We use lots of chemicals and their abbreviations. For example, Acetonitrile is commonly called "ACN".
One design philosophy of readable code is having one's code mirror the way one speaks. For example, a chemist might say "flush the chamber with ACN," so a readable code representation might be
instrument.flush_chamber(Fluids.ACN)
.I have observed codespell tends to flag acronyms like
ACN
. From #1578 (comment), the current solution is to pass an allow list of lowercase'd acronyms:Currently, I have a steadily growing allow-list of chemical acronyms, which is a perfectly viable solution.
Question
What is codespell's stance on technical acronyms? Is there an alternate way of handling a steadily increasing number of technical acronyms (referring to various chemicals)?
Thank you in advance!
The text was updated successfully, but these errors were encountered: