agentleFS
open-metadataopen-metadata/OpenMetadata/skills/java-checkstyle/SKILL.md

java-checkstyle

Skill15k starsChanged 3 months agoApache-2.0View on GitHub

Run `mvn spotless:apply` to fix Java checkstyle / formatting failures and verify the result. Invoke after authoring or modifying any `.java` files, or when CI reports a "Java checkstyle failed" or "Fix Java checkstyle" issue on a PR.

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 10 mentionsMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 8 mentionsSep 2026: 4 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the open-metadata/OpenMetadata repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about open-metadata/OpenMetadata

The biggest 5 of 40 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 40

Talked about on GitHub, Bluesky and Hacker News (40 times).

On GitHub · 29

24 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Hacker News · 1

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After you have finished authoring or editing any .java files — before opening a PR or pushing a commit that touches Java.

    line 28
  2. Very specific:

    No arguments: run mvn spotless:apply at the repo root across all modules.

    line 33
  3. Distinctive:

    Do not fold the reformat into an unrelated commit.

    line 71
  4. Distinctive:

    If Spotless keeps rewriting a change you just made, re-read the config — Spotless is the source of truth, not the IDE.

    line 85

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Java Checkstyle / Spotless

OpenMetadata enforces Java formatting via the Spotless Maven plugin. Every CI build runs mvn spotless:check and fails the PR if any file is not formatted. This skill keeps the fix on a single, consistent command so reviewers never have to ask for it manually again.

When to activate

  • The user asks to "fix checkstyle", "fix Java formatting", "apply spotless", "run spotless", "format Java", or similar.
  • CI posts a Java checkstyle failed / Fix Java checkstyle comment on a PR (the project's bot phrases the instruction as "Please run mvn spotless:apply in the root of your repository and commit the changes to this PR").
  • After you have finished authoring or editing any .java files — before opening a PR or pushing a commit that touches Java.

Arguments

  • No arguments: run mvn spotless:apply at the repo root across all modules.
  • -pl <module>: scope to a single Maven module (e.g. -pl openmetadata-service). Useful when only one module changed and you want a faster run.
  • --check: run mvn spotless:check instead of apply. Use to confirm the tree is clean without touching files (e.g. to verify before push).

Process

Step 1: Run Spotless

From the repo root:

mvn spotless:apply                 # default — formats everything
# or
mvn -pl <module> spotless:apply    # scoped to one module
# or
mvn spotless:check                 # verify only, don't write

Spotless is fast (seconds, no compilation). If it fails with a plugin error (not a formatting diff), surface the error and stop — do not try to hand-edit formatting around the failure.

Step 2: Check what changed

git status --short
git diff --stat

Expect reformatting in .java files only. If Spotless touches pom.xml or other non-Java files, that's also fine — Spotless is configured for those too in this repo.

Step 3: Commit

Do not fold the reformat into an unrelated commit. If the user asked you to commit, follow their preference (fold into the in-progress commit, or make a separate one). Otherwise, when you are confident the change is a purely mechanical formatting reformat, you may commit it on its own as a Fix Java checkstyle commit — this matches the repo's existing history for bot-triggered formatting-only commits. If you are unsure whether the diff is purely mechanical, do NOT auto-commit: surface the changed-file list and let the user decide.

Notes

  • Spotless config lives in the root pom.xml (spotless-maven-plugin section) — googleJavaFormat + removeUnusedImports. Do not redefine formatting rules inline in source files.
  • If Spotless keeps rewriting a change you just made, re-read the config — Spotless is the source of truth, not the IDE.
  • CI enforcement lives in .github/workflows/java-checkstyle.yml: the java-checkstyle job runs mvn spotless:apply and fails (git diff-files) if the tree was not already formatted, posting the "Please run mvn spotless:apply" comment.

Out of scope

  • UI / TypeScript formatting — use the ui-checkstyle skill (ESLint + Prettier + organize-imports); this skill is Java-only.
  • Python formatting — use make py_format (ruff lint-fix + format; see ingestion/Makefile). (Note: this is ruff, not black/isort/pycln.)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.