Repository navigation
docs: document -Ppre-commit as auto-fixing, not a pass/fail check - #137
Conversation
-Ppre-commit rewrites tracked sources in place (license:format, rewrite:run). Documenting it as a pass/fail 'check' or 'gate' misleads: a run that repaired the tree and a run that changed nothing both exit 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-Ppre-commit rewrites tracked sources in place (license:format, rewrite:run). Documenting it as a pass/fail 'check' or 'gate' misleads: a run that repaired the tree and a run that changed nothing both exit 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: cuioss/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="CLAUDE.md" line_range="20" />
<code_context>
./mvnw test -Dtest=ClassName#methodName
-# Pre-commit checks
+# Pre-commit auto-fix (license headers + formatting) - review and commit what it changed
./mvnw -Ppre-commit clean verify -DskipTests
```
</code_context>
<issue_to_address>
**nitpick:** The new descriptions reduce the profile's mutations to “license headers + formatting,” but `rewrite:run` applies all configured OpenRewrite recipes, which can make non-formatting source changes. Users following this wording can review the profile as a formatter only and overlook semantic recipe changes.
**Triggers:** When a configured OpenRewrite recipe performs a transformation that is not merely formatting.
**Suggested fix:** Describe the profile as applying license formatting and all configured OpenRewrite recipes, and require reviewing every resulting diff.
```suggestion
# Pre-commit auto-fix (license formatting + all configured OpenRewrite recipes) - review every resulting diff before committing
```
</issue_to_address>Sourcery assessment
Approved.
Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Review feedback: 'license headers + formatting' understates the profile. license:format (mycila) updates headers; rewrite:run applies EVERY configured OpenRewrite recipe, which includes modernization and can make semantic source changes -- not merely formatting. Attributing both to 'OpenRewrite formatting' invites reviewing the diff as cosmetic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sourcery withdrew this approval because the latest commits introduced blocking findings.
Aligns this repo's
-Ppre-commitframing to what the command actually does.-Ppre-commitis a formatter, not a pass/fail check. The profile inherited fromcui-java-parentbinds two mutating executions ahead ofverify:license:format(process-sources) — adds or updates license headersrewrite:run(no declared phase → descriptor defaultprocess-test-classes) — applies the OpenRewrite recipesBoth run before
verify, so a run that repaired the tree and a run that changed nothing both exit 0. Documenting it as a "check", "gate", or "quality verification" implies a green run means the tree was already clean — it does not. Empirically: strip a license header, run-Ppre-commit verify, and it exits 0 with the header silently restored andgit statusclean.The corpus carried two contradictory framings. This aligns everything to:
-Ppre-commitauto-fixes; review what it changed and commit it.The reference wording is
cuioss-parent-pom's own docs, which already say it correctly ("Adds or updates Apache 2.0 license headers…", "Applies all configured OpenRewrite recipes…") and are unchanged.Note this is a documentation change only — no build behaviour changes. Auto-fixing is the intended org-wide norm, in every language.
🤖 Generated with Claude Code