diff options
author | Pedro Portela <pedro12909@hotmail.com> | 2017-03-07 15:09:56 +0000 |
---|---|---|
committer | rnveach <rveach02@gmail.com> | 2017-03-08 20:52:03 -0500 |
commit | 7e8aff17447a9ca21e611a6af7ef8a94d892b11a (patch) | |
tree | f8edb43728e9be1f5060f8f60560be7eb1ee0746 /src | |
parent | 0906005ee6cea1d121cbb81833dc21fbac3599f4 (diff) | |
download | checkstyle-7e8aff17447a9ca21e611a6af7ef8a94d892b11a.tar.gz |
Issue #3943: Add examples for xdoc for ArrayTrailingComma
Diffstat (limited to 'src')
-rw-r--r-- | src/xdocs/config_coding.xml | 29 |
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> -<module name="ArrayTrailingComma"/> - </source> + </p> + <source> + <module name="ArrayTrailingComma"/> + </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"> |