Skip to content

Commit

Permalink
Issue checkstyle#13213: Removed //ok from magicNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
MANISH-K-07 authored and romani committed Jan 17, 2024
1 parent 671e9cc commit 0ee4402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions config/checkstyle-input-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@
files="checks[\\/]coding[\\/]illegaltokentext[\\/]InputIllegalTokenTextTextBlocks.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]illegaltokentext[\\/]InputIllegalTokenTextTextBlocks.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]magicnumber[\\/]InputMagicNumberIgnoreFieldDeclarationRecords.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]magicnumber[\\/]InputMagicNumberIgnoreFieldDeclarationRecords.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]magicnumber[\\/]InputMagicNumberIgnoreFieldDeclarationRecords.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]nofinalizer[\\/]InputNoFinalizerFallThrough.java"/>
<suppress id="UnnecessaryOkComment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
public class InputMagicNumberIgnoreFieldDeclarationRecords {
@anno(6) // violation
public record MyRecord() {
private static int myInt = 7; // ok
private static int myInt = 7;

public MyRecord{
int i = myInt + 1; // no violation, 1 is defined as non-magic
Expand All @@ -41,9 +41,9 @@ public int hashCode() {
}

class TestClass {
static int X = 42; // ok
static int X = 42;
}

record TestRecord() {
static int X = 42; // ok
static int X = 42;
}

0 comments on commit 0ee4402

Please sign in to comment.