Nebula Lint should not warn of an unused dependency for @Retention(RetentionPolicy.SOURCE) annotations .
Steps to reproduce:
Create a gradle project and add the gradle lint plugin. Add project lombok. Create a class and annotate it with a lombok annotation. Run gradle lint and observe the warning.
Extended Description:
Project Lombok is an annotation processor that will generate getters/setters for your code at compile time. Take a look at their @Data annotation source:
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface Data {
}
Here is an example class using that
@Data
public class SomeDataStruct {
private Integer id;
private String name;
}
Nebula lint gives the following warning:
> Task :lintGradle FAILED
This project contains lint violations. A complete listing of the violations follows.
Because none were serious, the build's overall status was unaffected.
warning unused-dependency this dependency is a service provider unused at compile time and can be moved to the runtime configuration
Summary:
Nebula Lint should not warn of an unused dependency for
@Retention(RetentionPolicy.SOURCE)
annotations .Steps to reproduce:
Create a gradle project and add the gradle lint plugin. Add project lombok. Create a class and annotate it with a lombok annotation. Run gradle lint and observe the warning.
Extended Description:
Project Lombok is an annotation processor that will generate getters/setters for your code at compile time. Take a look at their
@Data
annotation source:Here is an example class using that
Nebula lint gives the following warning:
Workaround:
Finally, thank you for making this plugin open source. I've found a lot of value in it.