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

🐛 Add annotation inspection support #104

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

jmle
Copy link
Collaborator

@jmle jmle commented Jul 16, 2024

  • Adds support for annotation queries, allowing to inspect matched FIELDs, METHOD_DECLARATIONs and TYPE declarations.
  • Corrects a bug with parenthesis handling.
  • Adds support for METHOD_DECLARATION.

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
@@ -108,6 +111,28 @@ private static SearchPattern mapLocationToSearchPatternLocation(int location, St
return getPatternSingleQuery(location, query);
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you so much!

jmle added 2 commits July 16, 2024 15:15
Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

LGTM

@jmle jmle requested a review from pranavgaikwad July 16, 2024 15:03
@shawn-hurley shawn-hurley merged commit dcae7c2 into konveyor:main Jul 16, 2024
6 checks passed
shawn-hurley pushed a commit to konveyor/analyzer-lsp that referenced this pull request Jul 22, 2024
This PR adds support for inspecting annotations.

:green_circle: Things that can be done now:
- Check for annotations that are annotating specific
`FIELD_DECLARATION`, `METHOD_DECLARATION` or `TYPE`
- Match against `METHOD_DECLARATION`

:red_circle: Things that cannot be done **yet**:
- Match `location: ANNOTATION` and inspect its values.
- Inspect on annotations on `location: CONSTRUCTOR`.

Depends on:
- konveyor/java-analyzer-bundle#104

Fixes:
- #460
- #467

---------

Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
@jmle
Copy link
Collaborator Author

jmle commented Jul 24, 2024

Also fixes #36

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.

3 participants