dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

Generate output for `project`/`build` health in machine-readable format

Open Nava2 opened this issue 8 months ago • 3 comments

Describe the solution you'd like New output format for projectHealth and buildHealth.

In order to support features like Github Checks, we need the ability to see line-numbers and other metadata associated with files specifically.

In order to reduce the feature request, if we generated errorformat outputs, we could hook into tools like @reviewdog/reviewdog.

Describe alternatives you've considered

I wrote up a github action with a python script to parse the buildHealth.txt file for outputs: https://github.com/Nava2/dependency-analysis-reviewdog-action. This works OK, but it is brittle and prone to errors as the formats change.

Another, better example than errorformat is probably using sarif (Link)

Nava2 avatar Jan 02 '24 14:01 Nava2

The filterAdvice task generates a report at reports/dependency-analysis/final-advice.json, and this report is machine-readable. Is this not sufficient? The plugin also supports users adding their own post-processing task which will automatically ingest that report and give you access to the full data model of the advice. See the wiki.

autonomousapps avatar Jan 08 '24 23:01 autonomousapps

I think the JSON format is much better than what I currently have been using. However, it would still be nice to have sarif format or another widely used format built-in to avoid building them from scratch. 👍🏻

Nava2 avatar Jan 13 '24 21:01 Nava2

Thanks for the issue. I do not have time to implement this request. I imagine there must be many competing "standards", and I can't implement them all. Maybe what you want is some kind of service loader framework and a plugin system to auto-convert the plugin's canonical output to something custom.

autonomousapps avatar Jan 14 '24 18:01 autonomousapps