Skip to content

ci: enable gh annotations with ast-grep #14840

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

Merged
merged 1 commit into from
Jun 25, 2025
Merged

Conversation

rmuir
Copy link
Member

@rmuir rmuir commented Jun 24, 2025

Error is still printed to console, but in a special structured format recognized by actions to highlight and annotate the problem in your PR.

When clicking the build failure, annotations can be seen at the very top of action link (no need to look at logs). Github does highlight the failures in red in the logs as well.

You can see the problems annotated inline in the sources, when reviewing the changes.

Relates: #14835

@dweiss, I know it doesn't solve that issue, nor does it even make use of the autofix I wrote, but I still think it is an improvement to usability.

Screen_Shot_2025-06-23_at_21 27 33

Error is still printed to console, but in a special structured format
recognized by actions to highlight and annotate the problem in your PR.

When clicking the build failure, annotations can be seen at the very top
of action link (no need to look at logs). Github does highlight the
failures in red in the logs as well.

You can see the problems annotated inline in the sources, when reviewing
the changes.
Copy link

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

Copy link
Contributor

@dweiss dweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

@rmuir
Copy link
Member Author

rmuir commented Jun 25, 2025

ill try to look if it makes sense to configure any other checkers... if you have ideas let me know. the EditorConfigLint would be my first idea to look at next otherwise, due to the fact it is golang tool and not "gradle native".

if linters doesn't support the actions format, we can alternatively put json files in .github directory that specify vim efm-like patterns: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md

@rmuir rmuir merged commit 99b10c8 into apache:main Jun 25, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants