-
Notifications
You must be signed in to change notification settings - Fork 28
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
[234] Create rules detecting use of MicroProfile OpenAPI to facilitate EAP XP5->6 migration. #235
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @pferraro, thank you for submitting this. The rule you have submitted is technically correct, but usually we try to cater for all the available points of the migration guide so that we can offer a more accurate report. It would be good to cover these points in the migration guide too (the Incompatible Changes section is the only one I can see with meaningful changes).
@jmle Is the java language provider capable of more than just regex parsing? If not, I do not see how to make this more specific without introducing false negatives. |
@pferraro of course. Take a look at other rules in this repo or at the docs. The providers are backed by language servers, so they can do more complex lookups than just regexing. Feel free to ask me any questions. |
@jmle I had already consulted the docs you linked, which only describes the use of regular expressions for detecting code within a source file. MediaType mediaType = ...;
String type = mediaType.getSchema().getType().toString(); To detect this, I tried creating a rule using: java.referenced:
pattern: org.eclipse.microprofile.openapi.models.media.Schema ... with every location option, but was not able to convince the java language provider to detect this usage of the Schema interface, let alone a specific method on it. |
@jmle I've updated the proposed rules to detect specific method calls per your suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, there's only the missing descriptions in each rule, and maybe expand a bit on the message
fields.
default/generated/eapxp6/180-eapxp_microprofile_openapi_4.0.mta.yaml
Outdated
Show resolved
Hide resolved
…e EAP XP5->6 migration. Signed-off-by: Paul Ferraro <[email protected]>
https://issues.redhat.com/browse/JBEAP-28599