Skip to content

Reformat codebase and implement automated style verification #8

Closed

Description

@szkiba

Description

To modernize the ini4j codebase, the project will adopt the Google Java Style Guide. This task involves a one-time bulk reformat of the legacy source code and the integration of automated enforcement tools.

Tools will be configured to ensure the VS Code local environment matches the Maven CI build exactly.

Tasks

  • Initial Bulk Reformat: Run mvn spotless:apply to format all .java and .xml files.
  • Maven Integration:
    • Add com.diffplug.spotless:spotless-maven-plugin (version 3.x) to pom.xml.
    • Configure Java to use googleJavaFormat().
    • Configure XML to use eclipseWtp() (to align with Red Hat VS Code extension).
    • Bind the check goal to the verify phase.
  • Dev Container Configuration:
    • Update .devcontainer/devcontainer.json to install JoseVSeb.google-java-format-for-vs-code and redhat.vscode-xml.
    • Configure settings to disable the default Java formatter and enable "Format on Save" for both Java and XML.

Technical Details

  • Java Style: Google Java Style
  • XML Style: Eclipse WTP (Standard indentation)
  • Maven Plugin: com.diffplug.spotless:spotless-maven-plugin
  • VS Code Extensions:
    • Java: JoseVSeb.google-java-format-for-vs-code
    • XML: redhat.vscode-xml
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

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions