Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Feat] Add formatting support #201
This PR adds support for formatting the output is different formats.
To use it simply add
This PR also adds support for piping the result to a file (useful when formatting to json).
One gotcha is when piping the result and using the console format without no interaction on, you have to press enter even though you cannot see the result as you are piping it to somewhere else. (don't know why you would pipe the result when using console format)
Another gotcha is that pipes does not support ANSI, so to get colored output while piping, you have to add the
Adding a little todo with stuff I'll def forget if I dont add it here.
Jibbarth left a comment
I left some comments, but it's really good.
Formatters are simple to understand and this allow us to possibly add more format in the future (xml, html...
About the json structure, there is some plugin/library able to parse it and generate some report ?
@Jibbarth Thanks for the review!
So there is nothing that can parse this json, this is just a custom format that we specified ourself. However it opens up for the possiblity of tools doing that in the future. When we settle on a design, we should add a json structure file also.
Yeah, tried to make the formatter as simple as possible. We could actually add a xml formatter by wrapping the json formatter and converting the json to xml