Copilot commented on code in PR #165:
URL:
https://github.com/apache/maven-checkstyle-plugin/pull/165#discussion_r2507131780
##########
src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java:
##########
@@ -108,6 +108,19 @@ public class CheckstyleViolationCheckMojo extends
AbstractMojo {
@Parameter(property = "checkstyle.failOnViolation", defaultValue = "true")
private boolean failOnViolation;
+ /**
+ * Fail the build when the number of violations is not equal to {@link
#maxAllowedViolations}.
+ * <p>This prevents the following scenario:
+ * <ul>
+ * <li>some changes reduce the checkstyle count but maxAllowedViolations
is not updated</li>
+ * <li>some other changes introduces new violations but the build does
not fail, as the count left some margin for error</li>
Review Comment:
Grammatical error: "introduces" should be "introduce" since the subject
"changes" is plural.
```suggestion
* <li>some other changes introduce new violations but the build does
not fail, as the count left some margin for error</li>
```
##########
src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java:
##########
@@ -108,6 +108,19 @@ public class CheckstyleViolationCheckMojo extends
AbstractMojo {
@Parameter(property = "checkstyle.failOnViolation", defaultValue = "true")
private boolean failOnViolation;
+ /**
+ * Fail the build when the number of violations is not equal to {@link
#maxAllowedViolations}.
+ * <p>This prevents the following scenario:
+ * <ul>
+ * <li>some changes reduce the checkstyle count but maxAllowedViolations
is not updated</li>
+ * <li>some other changes introduces new violations but the build does
not fail, as the count left some margin for error</li>
+ * </ul>
+ *
+ * * @since 3.6.1
Review Comment:
There's a formatting error in the JavaDoc comment. The `@since` tag has an
extra asterisk before it, making it `* @since` instead of `@since`.
```suggestion
* @since 3.6.1
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]