-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
approvedbugfalse negativeissues where check should place violations on code, but does notissues where check should place violations on code, but does not
Milestone
Description
I have read check documentation: https://checkstyle.org/checks/annotationlocation.html
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
CODE:
/** This is a package. */
@Deprecated @CheckReturnValue
package com.google.checkstyle.test.chapter4formatting.rule4852classannotations;
// EXPECTED VIOLATION ABOVECLI:
$ java -jar checkstyle-10.26.1-all.jar -c google_checks.xml example1/package-info.java
Starting audit...
Audit done.
FORMATTER:
$ diff -Naru example1/package-info.java FormattedCode.java
- - - example1/package-info.java 2025-08-04 12:43:05.080476900 +0530
+++ FormattedCode.java 2025-08-04 12:55:47.703361100 +0530
@@ -1,4 +1,5 @@
/** This is a package. */
-@Deprecated @CheckReturnValue
+@Deprecated
+@CheckReturnValue
package com.google.checkstyle.test.chapter4formatting.rule4852classannotations;
Metadata
Metadata
Assignees
Labels
approvedbugfalse negativeissues where check should place violations on code, but does notissues where check should place violations on code, but does not