mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Add some tests for java/unused-reference-type
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
class ClassWithAnnotatedMethod {
|
||||
@MyAnnotation
|
||||
void doNothing() { }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
@MyAnnotation
|
||||
class ClassWithAnnotation {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
| ClassWithAnnotatedMethod.java:1:7:1:30 | ClassWithAnnotatedMethod | Unused class: ClassWithAnnotatedMethod is not referenced within this codebase. If not used as an external API it should be removed. |
|
||||
| UnusedClass.java:1:7:1:17 | UnusedClass | Unused class: UnusedClass is not referenced within this codebase. If not used as an external API it should be removed. |
|
||||
@@ -0,0 +1 @@
|
||||
Violations of Best Practice/Dead Code/DeadRefTypes.ql
|
||||
@@ -0,0 +1,2 @@
|
||||
public @interface MyAnnotation {
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
class UnusedClass {}
|
||||
Reference in New Issue
Block a user