Skip to content

Clear the checkstyle LineLength/ImportOrder backlog and flip both to error #276

Description

@anjuchamantha

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

  1. 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.
  2. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions