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

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

Open
ganadist opened this issue Feb 7, 2024 · 6 comments
Open
Labels
enhancement New feature or request

Comments

@ganadist
Copy link

ganadist commented Feb 7, 2024

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
Copy link
Member

bigdaz commented Feb 7, 2024

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
Copy link
Author

ganadist commented Feb 8, 2024

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
Copy link
Member

bigdaz commented Feb 8, 2024

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

@bigdaz bigdaz transferred this issue from gradle/gradle-build-action Feb 9, 2024
@bigdaz bigdaz added the enhancement New feature or request label Feb 9, 2024
@hfhbd
Copy link
Contributor

hfhbd commented Jul 15, 2024

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
Copy link
Member

bigdaz commented Jul 15, 2024

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

@bigdaz bigdaz changed the title Feature Request: add inline comment for compilation errors by Problem APIs. Present summary of errors and warnings reported via Problems API Jul 31, 2024
@ganadist
Copy link
Author

ganadist commented Sep 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants