aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPedro Portela <pedro12909@hotmail.com>2017-03-07 15:09:56 +0000
committerrnveach <rveach02@gmail.com>2017-03-08 20:52:03 -0500
commit7e8aff17447a9ca21e611a6af7ef8a94d892b11a (patch)
treef8edb43728e9be1f5060f8f60560be7eb1ee0746 /src
parent0906005ee6cea1d121cbb81833dc21fbac3599f4 (diff)
downloadcheckstyle-7e8aff17447a9ca21e611a6af7ef8a94d892b11a.tar.gz
Issue #3943: Add examples for xdoc for ArrayTrailingComma
Diffstat (limited to 'src')
-rw-r--r--src/xdocs/config_coding.xml29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/xdocs/config_coding.xml b/src/xdocs/config_coding.xml
index 5f8dd3f6c..62b410580 100644
--- a/src/xdocs/config_coding.xml
+++ b/src/xdocs/config_coding.xml
@@ -50,12 +50,31 @@ return new int[] { 0 };
</subsection>
<subsection name="Examples">
- <p>
+ <p>
To configure the check:
- </p>
- <source>
-&lt;module name=&quot;ArrayTrailingComma&quot;/&gt;
- </source>
+ </p>
+ <source>
+ &lt;module name=&quot;ArrayTrailingComma&quot;/&gt;
+ </source>
+ <p>
+ Which results in the following violations:
+ </p>
+ <source>
+ int[] numbers = {1, 2, 3}; //no violation
+ boolean[] bools = {
+ true,
+ true,
+ false
+ }; //violation
+
+ String[][] text = {{},{},}; //no violation
+
+ double[][] decimals = {
+ {0.5, 2.3, 1.1,}, //no violation
+ {1.7, 1.9, 0.6},
+ {0.8, 7.4, 6.5}
+ }; //violation
+ </source>
</subsection>
<subsection name="Example of Usage">