dependency_validator icon indicating copy to clipboard operation
dependency_validator copied to clipboard

Is it possible to get JSON output ?

Open prasunsultania opened this issue 1 year ago • 5 comments

Is it possible to get output as JSON ?

prasunsultania avatar Apr 02 '24 07:04 prasunsultania

Not currently possible given the current command line arguments / functionality

How are you wanting to use this data? and what are you expecting the output to be?

matthewnitschke-wk avatar Apr 24 '24 17:04 matthewnitschke-wk

@matthewnitschke-wk

I have written a tool to validate the PR before merging it so, that any missing/extra dependencies are addressed.

Below, screenshot will give an idea of what I have been trying to do

2024-04-25_12-11-05

prasunsultania avatar Apr 25 '24 06:04 prasunsultania

Interesting! Could you just use the stdout from running the dart run dependency_validator command?

Looks like you're just looking for a high level summary of what dependencies might be invalid, which the default stdout already provides

matthewnitschke-wk avatar Apr 25 '24 16:04 matthewnitschke-wk

@matthewnitschke-wk I can parse the stdout, is the format going to be consistent in future updates ?

prasunsultania avatar Apr 25 '24 17:04 prasunsultania

No, I don't think so

In your above example it appears as though you are just piping the output of npx depcheck to the comments on a jira issue. I didn't realize that you're also trying to parse the data within the result as well

If you could give an example of what data you're trying to parse from the results, that would help us understand how best to format the json output

matthewnitschke-wk avatar Apr 26 '24 21:04 matthewnitschke-wk