Skip to content
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

Add --output=json and --output=text option to CLI, to allow for better automation/reporting based on STDOUT #331

Merged
merged 4 commits into from
Dec 7, 2021

Conversation

dkreuer
Copy link
Contributor

@dkreuer dkreuer commented Dec 6, 2021

Looking through open issues I saw #294 and thought, "hey let's write a quick implementation for that".

I abstracted writing the actual unknown symbols table and added a json report writer. Please have a look!

There will be a new cli option "--output=[format]" which allows to specify either "text" or "json". If specified, all other output will be suppressed except for the actual report (which is the unknown symbols table for "text" or the json report for "json").
If the option is omitted, no behavior change occurs (normal text output with all the fluff).

Fixes #294

@dkreuer dkreuer force-pushed the feature/different-output-formats branch from a9cf1e2 to 1bd9049 Compare December 6, 2021 11:46
@dkreuer dkreuer force-pushed the feature/different-output-formats branch from 1bd9049 to 91414c2 Compare December 7, 2021 11:29
@dkreuer dkreuer requested a review from Ocramius December 7, 2021 11:33
Copy link
Collaborator

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes needed, but overall really close

@dkreuer dkreuer force-pushed the feature/different-output-formats branch from 91414c2 to 3d4cd6f Compare December 7, 2021 13:49
@dkreuer dkreuer requested a review from Ocramius December 7, 2021 13:51
Copy link
Collaborator

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 thanks @dkreuer!

@Ocramius Ocramius added this to the 3.8.0 milestone Dec 7, 2021
@Ocramius Ocramius self-assigned this Dec 7, 2021
@Ocramius Ocramius changed the title Add report format json Add --output=json and --output=text option to CLI, to allow for better automation/reporting based on STDOUT Dec 7, 2021
@Ocramius Ocramius merged commit 537138b into maglnet:3.8.x Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option for output format
2 participants