gradle / actions

A collection of GitHub Actions to accelerate your Gradle Builds on GitHub
https://github.com/marketplace/actions/build-with-gradle
MIT License
163 stars 41 forks source link

Present summary of errors and warnings reported via Problems API #30

Open ganadist opened 9 months ago

ganadist commented 9 months ago

It seems Gradle is working about Problems API. And these APIs contains problem events where errors are from.

So, if these APIs can integrated with Github Actions, developers can easily understand where compilation issues are coming from.

bigdaz commented 9 months ago

Thanks for the suggestion. I understand that more error information is available with the Problems API: can you clarify what you mean by "add inline comment"?

ganadist commented 9 months ago

Whenever build was failure, compiler (or other tools) shows where error was caused from like this.

Hello.java:3: error: no suitable method found for println(String,String)
        System.out.println("Hello", "World");

And I'm guessing these information can be accessible with Problems APIs.

Github API provides this feature to add comment to location of a specific file.

If gradle-build-action integrate with this feature, I expect similar result with https://github.com/le0nidas/ktlint-pr-comments?tab=readme-ov-file#example

bigdaz commented 9 months ago

Thanks for the clarification. This is a useful feature request, but not something we are likely to implement in the near future.

hfhbd commented 3 months ago

Do you still do not plan this feature in the near feature after integration the Java compiler with the problems api in Gradle 8.9? Or would you accept a contribution?

bigdaz commented 3 months ago

@hfhbd I won't have time to work on this in the coming months. A contribution would be welcome.

ganadist commented 2 months ago

Problems API Demo shows how add ProgressEvent listener on IDE only.

Is there a way to add listener on init-scripts of setup-gradle action?

I'm guessing implementation would be just converting from LineInFileLocation to Github Actions annotation.