Skip to content

Commit

Permalink
Issue checkstyle#13213: Removed //ok from matchxpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahanima authored and romani committed Feb 7, 2024
1 parent c3104f1 commit 6736431
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 36 deletions.
24 changes: 0 additions & 24 deletions config/checkstyle-input-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,30 +248,6 @@
files="checks[\\/]coding[\\/]illegaltype[\\/]InputIllegalTypeWhitespaceInConfig.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]innerassignment[\\/]InputInnerAssignmentLambdaExpressions.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpath.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpath2.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpath3.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpath4.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathAvoidInstanceCreationWithoutVar.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathExecutableStatementCount.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathForbidParameterizedConstructor.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathForbidPrintStackTrace.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathIllegalThrows.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathIllegalThrows.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathNoStackoverflowError.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]matchxpath[\\/]InputMatchXpathSingleLineComments.java"/>
<suppress id="UnnecessaryOkComment"
files="checks[\\/]coding[\\/]modifiedcontrolvariable[\\/]InputModifiedControlVariableEnhancedForLoopVariable.java"/>
<suppress id="UnnecessaryOkComment"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ public void test() { }

public void foo() { }

public void correct() { } // ok
public void correct() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ public void test() { }

public void foo() { }

public void correct() { } // ok
public void correct() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ public void test() { } // violation

public void foo() { } // violation

public void correct() { } // ok
public void correct() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ public void test() { }

public void foo() { }

public void correct() { } // ok
public void correct() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class InputMatchXpathAvoidInstanceCreationWithoutVar {
public void test() {
SomeObject a = new SomeObject(); // violation
var b = new SomeObject(); // OK
var b = new SomeObject();
}

class SomeObject {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class InputMatchXpathExecutableStatementCount {
public void test() {
while (true) { // ok
while (true) {
Runnable runnable = new Runnable() {
public void run() {
while (true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public InputMatchXpathForbidParameterizedConstructor(Object c) { } // violation

public InputMatchXpathForbidParameterizedConstructor(int a, String b) { } // violation

public InputMatchXpathForbidParameterizedConstructor() { } // ok
public InputMatchXpathForbidParameterizedConstructor() { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public void test2() {
try {
throw new IOException();
} catch (IOException e) {
// ok
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

public class InputMatchXpathIllegalThrows {
public void func1() throws RuntimeException {} // violation
public void func2() throws Exception {} // ok
public void func2() throws Exception {}
public void func3() throws Error {} // violation
public void func4() throws Throwable {} // violation
public void func5() throws NullPointerException {} // ok
public void func5() throws NullPointerException {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ public class InputMatchXpathNoStackoverflowError {
+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""
+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""
+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""+""
; // ok
;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

public class InputMatchXpathSingleLineComments {
void foo() {
int num; // Trailing comment // ok
int num; // Trailing comment

boolean isTrue; //Some Comment // violation
double pi = 3.14; //Constant PI value // violation
Expand Down

0 comments on commit 6736431

Please sign in to comment.