You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ java -jar .\checkstyle-10.19.0-SNAPSHOT-all.jar -c .\google_checks.xml .\InputTryCatchIfElse.java
Starting audit...
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:12: Empty blocks should have no spaces. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) [RegexpSinglelineJava]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:18: Empty blocks should have no spaces. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) [RegexpSinglelineJava]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:24: Empty blocks should have no spaces. Empty blocks may only be represented as {} when not part of a multi-block statement (4.1.3) [RegexpSinglelineJava]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:26:43: '{' at column 43 should have line break after. [LeftCurlyEol]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:30:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:33:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:36:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:45:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:48:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:55:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:58:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
[WARN] C:\checkstyle testing\.\InputTryCatchIfElse.java:67:5: '}' at column 5 should be on the same line as the next part of a multi-block statement (one that directly contains multiple blocks: if/else-if/else, do/while or try/catch/finally). [RightCurlySame]
Audit done.
As part of this issue, we need to fix all false-negatives regarding LITERAL_CATCH. Generate diff reports and find edge cases, fix them too.
The issue will most probably require modifying suppression for LITERAL_CATCH.
The text was updated successfully, but these errors were encountered:
I have read check documentation: https://checkstyle.org/checks/blocks/leftcurly.html https://checkstyle.org/checks/blocks/rightcurly.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
follow up of #15664
In the above mentioned issue,
LITERAL_FINALLY
was moved fromRightCurlySame
toRightCurlyAlone
as part of this PR: #15789Now the current behavior of google_checks.xml for detecting K & R blocks for
LITERAL_CATCH
is as follows:From google_checks.xml:
As part of this issue, we need to fix all false-negatives regarding
LITERAL_CATCH
. Generate diff reports and find edge cases, fix them too.The issue will most probably require modifying suppression for
LITERAL_CATCH
.The text was updated successfully, but these errors were encountered: