-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added optional jsw format to json reporter #5017
feat: added optional jsw format to json reporter #5017
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as waiting for changes per #4889 (comment).
I addressed the changes requested in #4889 (comment). Instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progress! 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting there, but I think we might have missed each other on the reporter option name & usage?
👋 Ping @CheadleCheadle, is this still something you have energy & time for? I'm waiting to be explicitly re-requested for review. Please let me know if I should go ahead and re-review. 🙂 |
Closing out to free up the backing issue. @CheadleCheadle if you end up seeing this and having time again, no worries, feel free to re-open the PR or send a new one. If anybody else sees this message and there isn't a new PR, feel free to send one yourself. Just make sure to add a co-author attribution if it takes code from this PR. Cheers all! 🤎 |
Requirements
Description of the Change
Added an optional CLI argument ('jsw' or 'jsonStringifyWhitespace') that allows for the user to set the whitespace of the JSON reporter. If it isn't provided it defaults to the current value (2).
This change allows for more customization of the JSON output!
Closes #4889
Alternate Designs
An alternative approach might involve using a boolean CLI argument to toggle the JSON reporter and remove whitespace. However, a more precise level of customization can be achieved by using a CLI argument to control the amount of whitespace instead.
Why should this be in core?
It's a relatively simple change that simplifies the parsing of the JSON output."
Benefits
This feature would prove valuable when parsing JSON test results. For example, Splunk mandates JSON formatting with no whitespace, and having the option to generate whitespace-free JSON would enable Splunk to directly use the data without additional processing.
Possible Drawbacks
There shouldn't be any drawbacks to making this modification. It allows for further customization but is kept default if not specified.
Applicable issues
N/A