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

Simplified command-line argument to generate JSON #24

Open
rwatson opened this issue Nov 8, 2023 · 1 comment
Open

Simplified command-line argument to generate JSON #24

rwatson opened this issue Nov 8, 2023 · 1 comment
Assignees

Comments

@rwatson
Copy link
Member

rwatson commented Nov 8, 2023

I suspect there are lots of magic libxo arguments I can use, once I figure them out, but it would be useful to also add a -j argument to force JSON output to avoid the need to read the libxo(3) man page in detail for basic use. In the L41 labs, I use this code when spotting the -j:

xo_set_style(NULL, XO_STYLE_JSON);
xo_set_flags(NULL, XOF_PRETTY);

Which seems to do the trick.

@rwatson rwatson changed the title Command-line argument to generate JSON Simplified command-line argument to generate JSON Nov 8, 2023
@psjm3
Copy link
Contributor

psjm3 commented Nov 21, 2023

I have added the changes to include a -j option, but the output doesn't run until the end, almost like some kind of buffer has run out. But even if I pipe the output to more or to a file, it only goes so far and the rest of the output is cut off.

This branch has the changes: https://github.com/CTSRD-CHERI/chericat/tree/add-json-option

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

No branches or pull requests

2 participants