Skip to content

Add linter to project and workflows#8

Merged
XavierJCallait merged 32 commits intomainfrom
7-add-linter-to-project-and-workflows
Aug 5, 2025
Merged

Add linter to project and workflows#8
XavierJCallait merged 32 commits intomainfrom
7-add-linter-to-project-and-workflows

Conversation

@XavierJCallait
Copy link
Owner

Added spotless formatter for now. Configured to use the Google-Java-Format.

@XavierJCallait XavierJCallait linked an issue Aug 5, 2025 that may be closed by this pull request
@XavierJCallait XavierJCallait requested a review from Copilot August 5, 2025 18:28
@XavierJCallait XavierJCallait temporarily deployed to Continuous Integration August 5, 2025 18:28 — with GitHub Actions Inactive

This comment was marked as outdated.

@XavierJCallait XavierJCallait temporarily deployed to Continuous Integration August 5, 2025 19:42 — with GitHub Actions Inactive
@XavierJCallait XavierJCallait temporarily deployed to Continuous Integration August 5, 2025 20:29 — with GitHub Actions Inactive
@XavierJCallait XavierJCallait marked this pull request as ready for review August 5, 2025 23:17
@XavierJCallait XavierJCallait requested a review from Copilot August 5, 2025 23:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates code formatting and linting tools into the project to enforce consistent code style and catch potential bugs. The primary change is adding Spotless formatter with Google Java Format and SpotBugs linter, along with necessary workflow updates.

  • Added Spotless and SpotBugs Maven plugins to pom.xml for code formatting and static analysis
  • Reformatted all existing Java files to comply with Google Java Format standards
  • Restructured GitHub Actions workflows to include formatting/linting checks before verification

Reviewed Changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pom.xml Added Spotless and SpotBugs plugins with configuration
.github/workflows/format-lint.yml New workflow for running formatter and linter checks
.github/workflows/verify-run.yml Updated to be callable by other workflows
.github/workflows/linter.yml Removed old linter workflow
.github/actions/setup-env/action.yml New reusable action for Java/Maven setup
src/main/java/util/HibernateUtil.java Reformatted and updated API to return Session instead of SessionFactory
src/main/java/util/EnvironmentVariableInitializer.java Reformatted and fixed defensive copying in getter
src/main/java/util/DatabaseManager.java Reformatted and improved resource management
src/main/java/util/AppShutdown.java Reformatted and updated method name from Shutdown to shutdown
src/main/java/service/Inventory.java Reformatted and changed static fields to instance fields
src/main/java/model/* Reformatted constructor parameters for better readability
src/main/java/app/InventoryApp.java Reformatted and added sample product manipulation code
src/test/java/* Reformatted import statements and javadoc comments
README.md Updated with better documentation of Maven commands

@XavierJCallait XavierJCallait merged commit bd6e9a4 into main Aug 5, 2025
3 checks passed
@XavierJCallait XavierJCallait deleted the 7-add-linter-to-project-and-workflows branch August 5, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Linter to project and workflows

1 participant