-
Notifications
You must be signed in to change notification settings - Fork 47
fix(GCI82): fix rule to handle Lombok generated setters #113
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
base: main
Are you sure you want to change the base?
fix(GCI82): fix rule to handle Lombok generated setters #113
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.
Did not have time to test it
.../java/org/greencodeinitiative/creedengo/java/checks/MakeNonReassignedVariablesConstants.java
Show resolved
Hide resolved
964426e to
83a1630
Compare
83a1630 to
20c3143
Compare
| @@ -1,9 +1,15 @@ | |||
| import java.util.logging.Logger; | |||
| import lombok.Setter; | |||
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.
this is the first use case ... using real imports like that.
but there is a second use case missing : if you don't use import but "@lombok.Setter" directly for example
could you add this second use case for all lombok imports ? you can add a second test file and a second unit test to check it.
|
|
||
| @Override | ||
| public List<Kind> nodesToVisit() { | ||
| return List.of(Kind.VARIABLE); |
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.
I think you can improve more efficiently the import checks. You can add "Kind.IMPORT" in the list of nodes to check. Because Imports are the first statements analyezed in the code, you can know if lombok importrs are present or not.
|
This PR has been automatically marked as stale because it has no activity for 30 days. |
fix the issue #107
Still some improvements can be done:
@lombok.Setteror@lombok.Datainstead of just@Setteror@Dataimport toto.Setterorimport toto.Data(same class has Lombok) but some TU and TI can be added.