Skip to content

fix: exclude standalone examples from mise run format#1931

Merged
zeitlinger merged 3 commits intomainfrom
fix-mise-format
Mar 4, 2026
Merged

fix: exclude standalone examples from mise run format#1931
zeitlinger merged 3 commits intomainfrom
fix-mise-format

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Mar 3, 2026

Summary

  • mise run format (i.e. spotless:apply) fails on JDK 25+ because
    standalone example POMs don't inherit the spotless plugin from the
    project parent, but are pulled into the reactor via the
    examples-and-integration-tests profile
  • Fix: use the fully-qualified plugin goal with profile deactivation
  • Add lint:example-poms check to catch this class of issue

Relates #1927 (comment)

Test plan

  • mise run format succeeds
  • lint:example-poms passes with the fix
  • lint:example-poms fails when reverting the fix

Standalone example POMs don't inherit the spotless plugin from the
project parent, so `spotless:apply` fails when they're in the reactor
(JDK 25+ activates the examples-and-integration-tests profile).

Use the fully-qualified plugin goal with profile deactivation to
skip these modules. Add a `lint:example-poms` check to catch this
class of issue in the future.

Fixes #1927
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
- chmod +x example-poms.py so mise discovers it as a task
- Remove stale `./mvnw spotless:apply` comment from AGENTS.md
- Add "run lint before pushing" rule to AGENTS.md
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Copy link
Collaborator

@jaydeluca jaydeluca left a comment

Choose a reason for hiding this comment

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

thanks for jumping on this!

**ALWAYS** run `mise run lint` before pushing to verify
all lints pass. CI runs the same checks and will fail
if any lint is violated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@zeitlinger zeitlinger merged commit 537fb88 into main Mar 4, 2026
9 checks passed
@zeitlinger zeitlinger deleted the fix-mise-format branch March 4, 2026 06:40
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.

2 participants