Skip to content

Conversation

zyrxvo
Copy link

@zyrxvo zyrxvo commented Aug 8, 2025

Context:
The CLI output, especially with the --reduced-profile flag, provides concise, actionable, and human readable information for improving and optimizing code. Additionally, the JSON output provides verbose details, perfect to use for machine-automated interpretation and analysis of the results.

Changes:
This PR enables the ability to save both the CLI output and the JSON output from the same profile when both the --cli and --json flags are used in conjunction with --outfile.

Drawbacks:
In order to prevent overwriting the JSON file, the plain text file is forced to have a .txt suffix. For consistency the HTML files are all forced to have a .html suffix.

Comments:
I understand that the default behaviour is to produce a JSON file and an HTML file for viewing in the browser. The change in this PR reflects the desire to provide the option of having the human readable profile as a text file, rather than only with a browser.

Signed-off-by: Garett Brown <[email protected]>
@emeryberger
Copy link
Member

Please address the CI issues above, thanks!

@zyrxvo
Copy link
Author

zyrxvo commented Aug 22, 2025

I addressed the CI issues by trying to keep the behaviour as similar to the original as possible. The only difference should be with --cli in combination with --outfile. Now, when --json is included, it also saves the table summary, either as it would be with only --cli or with --cli and --html.

@emeryberger emeryberger requested a review from sternj September 9, 2025 18:11
Co-authored-by: Emery Berger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants