software-engineering-handbook icon indicating copy to clipboard operation
software-engineering-handbook copied to clipboard

Add spelling and grammar checks to CI

Open ghost opened this issue 7 years ago • 7 comments

ghost avatar Jul 10 '18 09:07 ghost

A great idea, but I suspect this will be difficult to achieve without constantly configuring the selected tool due to the fact that most of the markdown files contain many acronyms and other phrases that will probably fail in any standard, non customized spell checker.

DannyBen avatar Jul 10 '18 11:07 DannyBen

How about we try it and see what the overhead is - might be smaller than you imagine? Having done this before on similar content, my experience is that the custom dictionary is a little work initially to get a core of common terms for our guide, but quickly becomes a sequence of smaller changes thereafter. The custom dictionary can itself form a glossary of terms so it has some additional value.

ghost avatar Jul 17 '18 07:07 ghost

Having done this before on similar content

Excellent. Do you have any recommended python or CLI tool for the job?

DannyBen avatar Jul 17 '18 07:07 DannyBen

If we are happy to add nodejs dependency to our builds then we could use https://www.npmjs.com/package/markdown-spellcheck. Thoughts?

ghost avatar Jul 17 '18 08:07 ghost

If we are in the "adding dependency on another language" territory, these would be my priorities:

  1. A binary CLI that does the job and is installable via apt get or curl - there is a chance someone developed something in Go, and this would tick this checkbox.
  2. A ruby based solution - example
  3. A node based solution

DannyBen avatar Jul 17 '18 10:07 DannyBen

Run-time dependency rather than language dependency (if I understood you correctly) - just happens to be a nodejs package.

The bit we would wrap in a spellchecker container...

apt-get install nodejs
apt-get install npm
npm i markdown-spellcheck

The bit we would execute...

mdspell *.md

We can make it a single purpose container as a black box to execute spell checks without contaminating your other containers or servers with node dependencies that they do not need.

If you're happy with that I can go ahead an build it?

ghost avatar Jul 17 '18 14:07 ghost

We can make it a single purpose container as a black box

Sounds perfect.

I was afraid of forcing the developers to have node + python + ruby before they can contribute, but if the non-python elements are nicely tucked away in a container, I think it is great. This way we are not limited to any given language, and use the right tool for each task. I love it.

Also, as a side note - one of the reasons I personally stay away from node packages, is the fact that using npm on a vagrant with a Windows host proved to be challenging (although thankfully, yarn solves some of the issues with it).

DannyBen avatar Jul 17 '18 14:07 DannyBen