diff options
-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"> |