tbroadley / spellchecker-cli

A command-line tool for spellchecking files.
MIT License
119 stars 16 forks source link

Add support for junit and json reports. #54

Closed m50 closed 4 years ago

m50 commented 4 years ago

This tool is very useful to be running for CI/CD documentation. We use gitlab and generate documentation using Gitlab Pages. We also run this tool in the CI environment prior to generating the docs, verifying that there are no spelling mistakes.

To better improve how we work with the spellchecker, I wanted some integration with Gitlab utilizing Junit reports. As such, this implements Junit reports.

It also implements JSON reports, but only because they are an easy win. Additional report types can come later if they are wanted.

Here is a screenshot of the junit report's output displaying in Gitlab:

Screenshot 2020-02-09 at 21 58 44

Note: I don't work with Javascript at all for my day job, and so my familiarity with the proper way to implement things, or the best approaches/practices is pretty much non existent. As such, there are probably issues with the implementation of this, but it works.

As far as testing goes, the two types of reports implemented here are generated by JSON.stringify() and generated by another package, so I'm not entirely sure if reports are necessary besides "It generates them". But if you require tests I will see what I can do. It has been manually tested, and is currently in "production" for us now (It's in use in our CI system).

tbroadley commented 4 years ago

Oh and I'm glad to hear that you're finding this tool useful.

tbroadley commented 4 years ago

Released in v4.1.0.