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

More documentation on best practices around parsing output from scripts #21

Open
svermeulen opened this issue Apr 10, 2022 · 2 comments

Comments

@svermeulen
Copy link

The readme states the following:

The output of all the commands is much nicer for humans than it is for computers. If you'd like the output of commands, or to be able to load a config file in your own tooling, we provide a small api.

I'd like to obtain things like the list of errors/warnings and the files/line numbers. I could parse the output from cyan build but I think this is probably not good practice. The text above suggests there is an API I could use for this, but I'm unclear on what this refers to exactly?

Alternatively - maybe we have a command line option to control whether to execute in 'plumbing' mode vs 'porcelain' mode, similar to git. So all commands have stable, parseable output, in addition to the default that is optimized for reading by user

@euclidianAce
Copy link
Member

This is definitely something I'd like to have and the api I was referring to was more about loading configs than running commands, but it would definitely be helpful to dump json or some structured format.

Not saying this to anyone specific but I think the way to do this would be to have a generic message emitting api (similar to the logging api) that knows what mode it's in to dump json or redirect to some logging function or user provided callback if they are using the api.

@euclidianAce euclidianAce added this to the 0.3 milestone Aug 16, 2022
@euclidianAce euclidianAce modified the milestones: 0.3, 0.4 Feb 2, 2023
@vlaaad
Copy link

vlaaad commented Mar 4, 2024

I'm looking forward to this feature, it would be very useful for integrating cyan into IDEs 👍

@euclidianAce euclidianAce removed this from the 0.4 milestone Jul 4, 2024
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

3 participants