Context
#38 added a repo-wide maven-checkstyle-plugin gate (bound to validate),
vendoring a ruleset (checkstyle.xml) content-derived from the WSO2 Financial Services
accelerator's own shared wso2/code-quality-tools ruleset, adapted to current Checkstyle module
names/properties and kept local (not fetched over HTTP at build time) for reproducible, offline
builds. A local checkstyle-suppressions.xml carries this repo's own exceptions. Most checks are
already enforced (failsOnError=true) - the tree was clean or got cleaned up (unused imports,
missing braces, System.out/printStackTrace, naming, whitespace, etc.) in that PR.
Three checks could not be enforced immediately because the pre-existing tree has a real backlog
and fixing it is a large, code-touching change out of scope for a CI-only PR. Each is suppressed
tree-wide in checkstyle-suppressions.xml for now:
LineLength (max 120) - ~450 violations
ImportOrder (default-group/java/javax, alphabetical within group, statics last) -
~190 violations
JavadocType (every protected+ type needs a Javadoc comment) - ~70 violations
What's needed
- Clear each backlog module by module (small, mechanical PRs are fine - no need for one giant
diff). Wrap long lines, reorder imports, add missing type-level Javadoc.
- As each check's backlog reaches zero, delete that check's
<suppress> line from
checkstyle-suppressions.xml so it starts failing the build like every other rule already
does.
Run mvn validate from the repo root to see the current violation list for a given check
(temporarily comment out its suppression line in checkstyle-suppressions.xml to see violations
for just that check).
Context
#38 added a repo-wide
maven-checkstyle-plugingate (bound tovalidate),vendoring a ruleset (
checkstyle.xml) content-derived from the WSO2 Financial Servicesaccelerator's own shared
wso2/code-quality-toolsruleset, adapted to current Checkstyle modulenames/properties and kept local (not fetched over HTTP at build time) for reproducible, offline
builds. A local
checkstyle-suppressions.xmlcarries this repo's own exceptions. Most checks arealready enforced (
failsOnError=true) - the tree was clean or got cleaned up (unused imports,missing braces,
System.out/printStackTrace, naming, whitespace, etc.) in that PR.Three checks could not be enforced immediately because the pre-existing tree has a real backlog
and fixing it is a large, code-touching change out of scope for a CI-only PR. Each is suppressed
tree-wide in
checkstyle-suppressions.xmlfor now:LineLength(max 120) - ~450 violationsImportOrder(default-group/java/javax, alphabetical within group, statics last) -~190 violations
JavadocType(every protected+ type needs a Javadoc comment) - ~70 violationsWhat's needed
diff). Wrap long lines, reorder imports, add missing type-level Javadoc.
<suppress>line fromcheckstyle-suppressions.xmlso it starts failing the build like every other rule alreadydoes.
Run
mvn validatefrom the repo root to see the current violation list for a given check(temporarily comment out its suppression line in
checkstyle-suppressions.xmlto see violationsfor just that check).