forked from checkstyle/checkstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue checkstyle#13345: Enable examples tests for NoArrayTrailingComm…
…aCheck
- Loading branch information
1 parent
f58f26f
commit 42b9ce9
Showing
5 changed files
with
46 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...esources/com/puppycrawl/tools/checkstyle/checks/coding/noarraytrailingcomma/Example1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*xml | ||
<module name="Checker"> | ||
<module name="TreeWalker"> | ||
<module name="NoArrayTrailingComma"/> | ||
</module> | ||
</module> | ||
*/ | ||
package com.puppycrawl.tools.checkstyle.checks.coding.noarraytrailingcomma; | ||
|
||
// xdoc section -- start | ||
class Example1 { | ||
void InvalidExample() { | ||
String[] foo1 = { | ||
"FOO", | ||
"BAR", // violation, 'Array should not contain trailing comma' | ||
}; | ||
// violation below, 'Array should not contain trailing comma' | ||
String[] foo2 = { "FOO", "BAR", }; | ||
String[] foo3 = { | ||
"FOO", | ||
"BAR" | ||
}; | ||
String[] foo4 = { "FOO", "BAR" }; | ||
} | ||
} | ||
// xdoc section -- end |
20 changes: 0 additions & 20 deletions
20
...resources/com/puppycrawl/tools/checkstyle/checks/coding/noarraytrailingcomma/Example1.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters