Skip to content

Issue #53: updated test report and upperEll to use 1 based index #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/main/java/org/checkstyle/autofix/recipe/UpperEll.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ private int calculateColumnOffset(String out) {
result = out.length();
}
else {
result = out.length() - lineBreakIndex - 1;
result = out.length() - lineBreakIndex;
}
return result;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ public class InputComplexLongLiterals {
private long multipleUnderscores = 1_234_567_890l;

private long maxLong = 9223372036854775807l;
private long minLong = -9223372036854775808l;
private long minLong = -9223372036854775808l; //false negative
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this false negative comment, please clarify what you meant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these literals are not fixed by the recipe, due to improper column calculation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please confirm this will be fixed by #56

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it will do.


private Long nullLong = null;
private Long simpleLong = 1234l;
private Long negativeLong = -5678l;
private Long negativeLong = -5678l; //false negative
private Long underscoreLong = 1_000_000l;
Long maxLongObject = 9223372036854775807l; //suppressed violation
Long minLongObject = -9223372036854775808l; //suppressed violation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ public class OutputComplexLongLiterals {
private long multipleUnderscores = 1_234_567_890L;

private long maxLong = 9223372036854775807L;
private long minLong = -9223372036854775808L;
private long minLong = -9223372036854775808l; //false negative

private Long nullLong = null;
private Long simpleLong = 1234L;
private Long negativeLong = -5678L;
private Long negativeLong = -5678l; //false negative
private Long underscoreLong = 1_000_000L;
Long maxLongObject = 9223372036854775807l; //suppressed violation
Long minLongObject = -9223372036854775808l; //suppressed violation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="10.12.3">
<file name="org/checkstyle/autofix/recipe/upperell/stringandcomments/InputStringAndComments.java">
<error line="11" column="30" severity="error"
<error line="11" column="31" severity="error"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: We need to finish with integration test pipeline asap to get rid of these manual report files and fully rely on actual checkstyle execution and report

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this is the way forward.

message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="18" column="21" severity="error"
<error line="18" column="22" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
</file>

<file name="org/checkstyle/autofix/recipe/upperell/hexoctalliteral/InputHexOctalLiteral.java">
<error line="4" column="28" severity="error"
<error line="4" column="29" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="5" column="28" severity="error"
<error line="5" column="29" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="6" column="25" severity="error"
<error line="6" column="26" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="7" column="26" severity="error"
<error line="7" column="27" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="8" column="27" severity="error"
<error line="8" column="28" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="11" column="25" severity="error"
<error line="11" column="26" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="12" column="27" severity="error"
<error line="12" column="28" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="13" column="28" severity="error"
<error line="13" column="29" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
</file>

<file name="org/checkstyle/autofix/recipe/upperell/complexlongliterals/InputComplexLongLiterals.java">
<error line="4" column="35" severity="error"
<error line="4" column="36" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="5" column="39" severity="error"
<error line="5" column="40" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="7" column="27" severity="error"
<error line="7" column="28" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="8" column="27" severity="error"
<error line="8" column="29" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="11" column="30" severity="error"
<error line="11" column="31" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="12" column="32" severity="error"
<error line="12" column="34" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="13" column="34" severity="error"
<error line="13" column="35" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="18" column="33" severity="error"
<error line="18" column="34" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="22" column="57" severity="error"
<error line="22" column="58" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="23" column="32" severity="error"
<error line="23" column="33" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="23" column="36" severity="error"
<error line="23" column="37" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="23" column="40" severity="error"
<error line="23" column="41" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="27" column="39" severity="error"
<error line="27" column="40" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="27" column="45" severity="error"
<error line="27" column="46" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="27" column="51" severity="error"
<error line="27" column="52" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="32" column="17" severity="error"
<error line="32" column="18" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="33" column="30" severity="error"
<error line="33" column="31" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="34" column="26" severity="error"
<error line="34" column="27" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="36" column="45" severity="error"
<error line="36" column="46" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="37" column="41" severity="error"
<error line="37" column="42" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="38" column="33" severity="error"
<error line="38" column="34" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="43" column="19" severity="error"
<error line="43" column="20" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
<error line="45" column="23" severity="error"
<error line="45" column="24" severity="error"
message="Use uppercase 'L' for long literals."
source="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck"/>
</file>
Expand Down
Loading