PS D:\CS\test> cat src/Test.java
record ColoredPoint(int p, int x, int c) { }
record Rectangle(ColoredPoint upperLeft, ColoredPoint lowerRight) { }
public class Test {
void test(Object obj) {
if (obj instanceof ColoredPoint( @Deprecated int _,_,_)){
}
@Deprecated
int _ = 0;
}
}
PS D:\CS\test> cat config.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<module name="TreeWalker">
<module name="AnnotationLocation">
</module>
</module>
</module>
PS D:\CS\test> java -jar checkstyle-10.17.0-all.jar -c config.xml src/Test.java
Starting audit...
Audit done.
PS D:\CS\test>
No update is needed for this check.
child of #14942 :
Check documentation:https://checkstyle.org/checks/annotation/annotationlocation.html#AnnotationLocation
No update is needed for this check.