Skip to content

autofix.ci - #38

Merged
yamcodes merged 8 commits into
mainfrom
3-add-autofixci
Mar 20, 2026
Merged

autofix.ci#38
yamcodes merged 8 commits into
mainfrom
3-add-autofixci

Conversation

@yamcodes

@yamcodes yamcodes commented Mar 20, 2026

Copy link
Copy Markdown
Owner

…EADME

  • Introduce autofix.ci workflow to apply Spotless auto-formatting on pushes and pull requests.
  • Configure spotless-maven-plugin in pom.xml to enforce Google's Java format standards.
  • Update README with additional IDE settings for seamless build and reload.

Closes #3

Summary by CodeRabbit

  • Documentation

    • Updated README and docs with clearer formatting, examples, and IDE tips; refreshed various template and fragment examples for consistent markup and spacing.
  • Chores

    • Added automated formatting/autofix CI and integrated Prettier and Spotless tooling plus format/check scripts.
    • Introduced editor configuration and editor extension recommendations; adjusted IDE inspection/default formatting settings for consistent editor behavior.

…EADME

- Introduce `autofix.ci` workflow to apply Spotless auto-formatting on pushes and pull requests.
- Configure `spotless-maven-plugin` in `pom.xml` to enforce Google's Java format standards.
- Update README with additional IDE settings for seamless build and reload.
@yamcodes yamcodes linked an issue Mar 20, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: eb97a983-8d26-49f8-b897-6b386ef2a64f

📥 Commits

Reviewing files that changed from the base of the PR and between 4e3a6c4 and 26b49fd.

📒 Files selected for processing (1)
  • .idea/externalDependencies.xml
✅ Files skipped from review due to trivial changes (1)
  • .idea/externalDependencies.xml

📝 Walkthrough

Walkthrough

Adds editor/formatter configs, Spotless and Prettier tooling, a GitHub autofix workflow, IDE config updates, and widespread HTML/CSS/Markdown formatting changes across templates and docs; no API/public Java signatures were modified.

Changes

Cohort / File(s) Summary
Formatting & Editor Config
\.coderabbit.yaml, \.editorconfig, \.prettierrc.json
Added/adjusted editor and formatter configs (editorconfig rules, Prettier plugin and printWidth, small YAML spacing change).
CI / Autofix Workflow
.github/workflows/autofix.yml
New GitHub Actions workflow runs Spotless, installs Bun, runs Prettier via Bun, and executes the pinned autofix-ci action on PRs and main pushes.
Build / Java Formatting
pom.xml
Added jackson-bom.version property and Spotless Maven plugin with googleJavaFormat configuration and check execution.
Node Tooling
package.json
Added Prettier devDependencies and format / format:check npm scripts for formatting HTML/JSON/YAML/MD.
IDE Settings
.idea/biome.xml, .idea/compiler.xml, .idea/externalDependencies.xml, .idea/inspectionProfiles/Project_Default.xml, .vscode/extensions.json
Removed Biome IDE config, deduplicated Lombok processor entry, replaced formatter plugin IDs, added Prettier VS Code recommendation, and enabled HtmlUnknownAttribute inspection with custom allowed values.
Docs & Readme
README.md, CLAUDE.md, docs/thymeleaf-fragments.md
Markdown/table formatting and spacing edits; added/adjusted inspection suppression comments in docs.
Thymeleaf Templates
src/main/resources/templates/..., src/main/resources/templates/fragments/...
Reformatted HTML (doctype lowercased, multiline indentation), reordered Tailwind/DaisyUI utility classes, moved some fields into grids, added inspection suppressions; preserved Thymeleaf expressions and behavior.
Static CSS
src/main/resources/static/css/input.css
Changed DaisyUI plugin invocation to explicit block with themes: false and added inspection suppression comment.
Java Source (formatting only)
src/main/java/codes/yam/contacts/ContactController.java
Minor formatting and relocation of a //noinspection comment; logic and signatures unchanged.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub as GitHub Actions
    participant Repo as Repository
    participant Maven as Maven/Spotless
    participant Bun as Bun/Node
    participant Prettier as Prettier
    participant Autofix as autofix-ci/action

    GitHub->>Repo: PR or push to main triggers workflow
    Repo->>Maven: run ./mvnw spotless:apply / check
    Maven-->>Repo: formatting results
    Repo->>Bun: setup Bun, install deps (bun install)
    Bun->>Prettier: bun run format (prettier + plugin)
    Prettier-->>Repo: formatted files
    Repo->>Autofix: run autofix-ci/action (pinned SHA)
    Autofix-->>Repo: create/update PR/commit with fixes
    GitHub-->>Repo: workflow completes
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

  • Shadcn UI - like UI #35 — Modifies DaisyUI theme configuration in the same CSS area; closely related to the input.css DaisyUI plugin changes in this PR.

Poem

🐰 wiggles nose
With Spotless paws and Prettier brush, I hop,
I tidy templates, give whitespace a swap,
Autofix scurries, CI hums a tune,
Code sleeps tidy under the silver moon. ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes extensive formatting-related changes beyond the core autofix.ci workflow: configuration files (.editorconfig, .prettierrc.json), IDE settings, Prettier tooling, CSS modifications, and template reformatting. While these support code quality goals, many appear tangential to the primary objective. Consider separating formatting infrastructure setup (.editorconfig, Prettier, IDE configs) and template reformatting into distinct PRs focused on specific formatting tool implementations, keeping autofix.ci workflow changes isolated.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'autofix.ci' is concise and directly references the main change—the addition of an autofix.ci GitHub Actions workflow for auto-formatting, which is the primary objective of this PR.
Linked Issues check ✅ Passed The PR successfully implements all coding requirements from issue #3: adds the autofix.ci GitHub Actions workflow, configures spotless-maven-plugin for Google Java formatting, and updates documentation for IDE settings.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 3-add-autofixci
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Add `.prettierrc.json` to configure Prettier with `prettier-plugin-tailwindcss` and set custom print width.
- Update `package.json` with Prettier scripts for formatting and checking HTML files.
- Refactor HTML templates for consistent theming and improved readability, aligning with Prettier's formatting.
- Enhance `autofix.yml` workflow to include Bun for dependency installation and formatting.
- Remove `.idea/biome.xml` and the Biome plugin from `externalDependencies.xml`.
- Add `.editorconfig` for consistent formatting across IDEs and editors.
- Update `.vscode/extensions.json` to include Prettier's VSCode extension.
# Conflicts:
#	src/main/java/codes/yam/contacts/ContactController.java
#	src/main/resources/templates/contacts/index.html
#	src/main/resources/templates/fragments/contact-list-rows.html
#	src/main/resources/templates/layout.html
@yamcodes
yamcodes marked this pull request as ready for review March 20, 2026 07:32

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
README.md (1)

142-142: Minor grammar suggestion: use "full-page" as a compound adjective.

Consider hyphenating "full-page" when used as a compound modifier before "reloads".

📝 Suggested fix
-| [`hono-web1`](https://github.com/yamcodes/contact.app/tree/hono-web1)          | Hypermedia-Driven Application | Server-rendered HTML using links and forms. Full page reloads. Pure hypermedia, no client-side JS.          |
+| [`hono-web1`](https://github.com/yamcodes/contact.app/tree/hono-web1)          | Hypermedia-Driven Application | Server-rendered HTML using links and forms. Full-page reloads. Pure hypermedia, no client-side JS.          |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 142, Update the README table row for `hono-web1` to use
the compound adjective "full-page" before "reloads" (change "Full page reloads"
to "Full-page reloads") so the description reads "Server-rendered HTML using
links and forms. Full-page reloads. Pure hypermedia, no client-side JS." Locate
the table row containing the `hono-web1` link and edit that cell accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@README.md`:
- Line 142: Update the README table row for `hono-web1` to use the compound
adjective "full-page" before "reloads" (change "Full page reloads" to "Full-page
reloads") so the description reads "Server-rendered HTML using links and forms.
Full-page reloads. Pure hypermedia, no client-side JS." Locate the table row
containing the `hono-web1` link and edit that cell accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 53f5f8f0-2112-4ffe-80c5-8bd85efe02da

📥 Commits

Reviewing files that changed from the base of the PR and between 217e8c1 and 4e3a6c4.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (25)
  • .coderabbit.yaml
  • .editorconfig
  • .github/workflows/autofix.yml
  • .idea/biome.xml
  • .idea/compiler.xml
  • .idea/externalDependencies.xml
  • .idea/inspectionProfiles/Project_Default.xml
  • .prettierrc.json
  • .vscode/extensions.json
  • CLAUDE.md
  • README.md
  • docs/thymeleaf-fragments.md
  • package.json
  • pom.xml
  • src/main/java/codes/yam/contacts/ContactController.java
  • src/main/resources/static/css/input.css
  • src/main/resources/templates/contacts/edit.html
  • src/main/resources/templates/contacts/index.html
  • src/main/resources/templates/contacts/new.html
  • src/main/resources/templates/contacts/view.html
  • src/main/resources/templates/error.html
  • src/main/resources/templates/error/404.html
  • src/main/resources/templates/fragments/contact-fields.html
  • src/main/resources/templates/fragments/contact-list-rows.html
  • src/main/resources/templates/layout.html
💤 Files with no reviewable changes (2)
  • .idea/biome.xml
  • .idea/compiler.xml

@yamcodes
yamcodes merged commit b94c4de into main Mar 20, 2026
2 checks passed
@yamcodes
yamcodes deleted the 3-add-autofixci branch March 20, 2026 07:44
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 autofix.ci

1 participant