archive mirror
 help / color / mirror / Atom feed
* Spell checker in OpenBMC CI
@ 2021-03-22  7:17 manoj kiran
  0 siblings, 0 replies; only message in thread
From: manoj kiran @ 2021-03-22  7:17 UTC (permalink / raw)
  To: openbmc

[-- Attachment #1: Type: text/plain, Size: 2270 bytes --]

Hi All,

OpenBMC coders are all atrocious spellers. In my opinion, spell-checks are never given the highest priority as we always were more obsessed with code. Correcting spelling mistakes is not as easy as it sounds, it cannot be automated as many reasonable-sounding corrections could change the meaning of the comment.

I have been recently working on enabling the spell check on commits in OpenBMC CI so that the CI can score a -1 when it sees a potential incorrect/misspelled word(s) in the commit as per its knowledge acquired from the dictionary.
While checking the existing implementations in various opensource projects, I was impressed with the way the Linux project[1] addressed this issue, It seems to use a python library called codespell [2] for improving their upstream patches. It seemed pretty simple & doable even in OpenBMC.

As an initial work, tried to bring the same package in OpenBMC & my intent is to start with just checking the commit message first [3], and then improve the infrastructure to check the comments in the code as well. The only real concern is that we should have a dictionary that should be simple & easily editable.

My initial patch-set addresses this issue by having two dictionaries:
One generic dictionary that comes along with the code spell library [4], so that we can update this dictionary with the mistakes done at a global level.

Another OpenBMC specific dictionary[5] that sits in the openbmc-build-scripts repository, allows users of OpenBMC to add words into them. ( I copied the dictionary currently being used in the Linux project as an initial version)

Dictionary format :
Each line corresponds to a single word and they follow the "mistake-> correction" format.

I'd love community feedback on this . Please feel free to stop by [3] and give your suggestions/review comments.


[-- Attachment #2: Type: text/html, Size: 2612 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-22  7:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22  7:17 Spell checker in OpenBMC CI manoj kiran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).