Skip to content

Document and localize Maven skip properties - #3009

Open
kalayciburak wants to merge 2 commits into
diffplug:mainfrom
kalayciburak:docs/maven-skip-properties
Open

Document and localize Maven skip properties#3009
kalayciburak wants to merge 2 commits into
diffplug:mainfrom
kalayciburak:docs/maven-skip-properties

Conversation

@kalayciburak

Copy link
Copy Markdown

Fixes

Fixes #2981

Changes and Review

The Maven README only documented spotless.check.skip, which made it look like a global switch. spotless.skip and spotless.apply.skip were already implemented but undocumented.

  • Document spotless.skip, spotless.check.skip, and spotless.apply.skip (scope + CLI/pom.xml usage) in the Maven plugin README.
  • Move the goal-specific skip parameters onto SpotlessCheckMojo / SpotlessApplyMojo; keep goal-agnostic spotless.skip on the shared base.
  • Add regression tests covering cross-goal isolation (check.skip does not skip apply, and vice versa).

Test Plan

  • ./gradlew :plugin-maven:test --tests 'com.diffplug.spotless.maven.SpotlessCheckMojoTest' — 9/9 GREEN

Please DO NOT FORCE PUSH. Don't worry about messy history.

Move spotless.check.skip and spotless.apply.skip onto their
respective mojos, keep spotless.skip on the shared base, and
document all three properties in the Maven plugin README so
check.skip is no longer mistaken for a global switch.

Fixes diffplug#2981

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 513a3827d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugin-maven/README.md Outdated
- set `spotless.check.skip` to `true` in the `<properties>` section of the `pom.xml`
| Property | Scope | Effect |
| --- | --- | --- |
| `spotless.skip` | all goals | Skips every Spotless goal (`check`, `apply`, …) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor spotless.skip in every documented goal

When users run mvn spotless:install-git-pre-push-hook -Dspotless.skip, this “all goals” promise is not honored: SpotlessInstallPrePushHookMojo extends AbstractMojo, and its execute() method never reads the global skip property, so it still installs the hook. Either add global-skip handling to that goal or document spotless.skip as covering only check and apply.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good catch — docs updated: spotless.skip is documented for check/apply only; it does not affect install-git-pre-push-hook.

install-git-pre-push-hook does not read spotless.skip.
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.

Document "spotless.apply.skip" and "spotless.skip" in README

1 participant