Skip to content

Conversation

@vimarie
Copy link

@vimarie vimarie commented May 21, 2025

fix the issue #107

Still some improvements can be done:

  • Manage the case when the annotation use is @lombok.Setter or @lombok.Data instead of just @Setter or @Data
  • The rule works for the case of import toto.Setter or import toto.Data (same class has Lombok) but some TU and TI can be added.
  • Eventually improve the code quality delivered (constant instead of string, test null case).

Copy link

@MP-Aubay MP-Aubay left a 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

@cali0pe cali0pe force-pushed the fix/challenge25-GCI82-handle-lombok branch from 964426e to 83a1630 Compare May 22, 2025 14:08
@cali0pe cali0pe force-pushed the fix/challenge25-GCI82-handle-lombok branch from 83a1630 to 20c3143 Compare June 6, 2025 09:53
@@ -1,9 +1,15 @@
import java.util.logging.Logger;
import lombok.Setter;
Copy link
Member

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

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.

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

This PR has been automatically marked as stale because it has no activity for 30 days.
Please add a comment if you want to keep the issue open. Thank you for your contributions!

@github-actions github-actions bot added the stale label Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants