aboutsummaryrefslogtreecommitdiffstats
path: root/checkstyle/src/main/resources/onap-checkstyle/onap-java-style.xml
AgeCommit message (Collapse)AuthorFilesLines
2022-03-30Enable @surpressWarnings for CheckstylejakartaToineSiebelink1-0/+2
Documentation is a bit ambigous but below changes should enable @SupressWarnings (in source code) for checkstyle rules we have some false positives from Checkstyle we want to supress this way e.g. https://tinyurl.com/4b527vvr lines 258/259; checkstyle forced us to add those lines, instead I want to supress the warning on this method using annotation like @supresswraning(checkstyle:missingSwitchDefault)) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I07f865a279b4951f2ce3240fedcec6b5c46933e0
2021-06-17Update Checkstyle to version 8.43liamfallon1-2/+0
The checkstyle plugin in the 2021-03 version of Eclipse defaults to version 8.43 of Checkstyle. This version of Checkstyle removes the "scope" keyword from the JavadocMethod module, because it is redundant, so the ONAP checkstyle onap-kava-style.xml file breaks. This review: - Removes the "scope" property from the "JavadocMethod" module, where it is redundant anyhow (scope applies on the "MissingJavadocMethod" module - Removes the "scope" property from the "MissingJavadocMethod" because it defaults to the correct value for ONAP, that is "public" Issue-ID: POLICY-3206 Change-Id: I62736ec812595929392b5eef0658acb77365c52a Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-19Upgrade checkstyle to version 8.32 Google styleliamfallon1-130/+242
This review upgrades the checckstyle in ONAP to version 8.32, and re-aligns the ONAP style definition with the 8.32 version of the Google style guide. This change was triggered by incompatible changes in checkstyle version 8.32. Checkstyle has removed the directives "allowMissingThrowsTag" and "allowThrowsTagsForSubclasses". These directives controlled whether the existence of @Throws tags should be checked or not. In ONAP, these directives were set to "don't check". The default behaviour in checkstyle now is not to check @Throws javadoc tags for existence. See: https://github.com/checkstyle/checkstyle/issues/7329 Issue-ID: INT-1271 Change-Id: Iaabbf05b6aaf244388f654aa4e965da3d3a4f4e9 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-09Update checkstyle rules to exclude methodsliamfallon1-0/+3
Checkstyle rules updated to: 1) allow getters and setters not to have javadoc 2) allow methods with less than 2 lines to not have javadoc 3) allow protected and private methods not to have javadoc 4) allow methods with names beginning with test|before|after not to have javaodc Issue-ID: INT-1395 Change-Id: I570cd90034c7b20d45a7e5a6ecacacdef80876a1 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-06Upgrade oparent to checkstyle 8.27liamfallon1-5/+9
Checkstyle 8.27 introduces incompatible changes in the checkstyle rule definition xml file. The latest Eclipse checkstyle plugin (version 8.26) uses this new checkstyle xml rule format. This change brings in the checkstyle 8.27 rule formats into oparent. Issue-ID: INT-1395 Change-Id: I453120e5cc95fa2e30a5d2f24083fd030e960a01 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-02-07Fix checkstyle build and xmlPamela Dragosh1-1/+0
The XML for onap-java-code style has a bug identified by Eclipse. The maxLineLength field is not allowed. In addition, not sure how any jobs work already, the sourceDirectory appends and extra "src/main/java" to the path so some builds don't always find the correct source files to generate warnings. The plugin is a bit flaky and sometimes seems to find the java files, while other times it does not. So some checkstyle warnings are not generated. Change-Id: Ia07065a0d0df1429643680cb5bd70b5ec13bebde Issue-ID: TSC-71 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-08-21Refactor oparent for independent versioningGary Wu1-0/+220
Change-Id: I543f394b360b6926986f33b48bef4b3355363beb Issue-id: INT-103 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>