Repository navigation
fix(validate): pluralize the text summary line - #664
Merged
tampakrap merged 1 commit intoDec 4, 2026
Merged
Conversation
tampakrap
requested review from
negz
and
a balanced review from Copilot
and removed request for
a team
December 4, 2026 21:23
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the validation summary noun-formatting change.
No open issues 🎉
What changed in this PR
Corrects singular and plural nouns in the crossplane validate text summary using the existing plural.Format helper.
Changes:
- Formats each summary count with the appropriate noun.
- Adds singular, plural, and zero-count unit tests.
- Updates integration assertions for singular output.
| File | Description |
|---|---|
| pkg/validate/output/render.go | Extracts summary formatting into a plural-aware helper. |
| pkg/validate/output/render_test.go | Tests noun forms and updates renderer expectations. |
| cmd/crossplane/validate/validate_integration_test.go | Updates expected singular summary text. |
Review effort: Balanced
haarchri
approved these changes
Dec 4, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
jcogilvie
approved these changes
Dec 4, 2026
tampakrap
force-pushed
the
theo/fix_validate_summary_plural
branch
from
December 4, 2026 22:27
1f573aa to
8b5094b
Compare
The summary line printed by `crossplane validate` used fixed plural nouns, so a single resource read "Total 1 resources: 0 missing schemas, 1 success cases, 0 failure cases". Build the line with plural.Format, so each count uses the singular noun when it is 1: "Total 1 resource: 0 missing schemas, 1 success case, 0 failure cases". Add a table test for the singular, plural and zero cases and update the two integration test assertions. Signed-off-by: Theo Chatzimichos <tampakrap@gmail.com>
tampakrap
force-pushed
the
theo/fix_validate_summary_plural
branch
from
December 4, 2026 22:38
8b5094b to
1689c42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description of your changes
The summary line printed by
crossplane validateused fixed plural nouns, so a single resource read "Total 1 resources: 0 missing schemas, 1 success cases, 0 failure cases".Build the line with
plural.Format, so each count uses the singular noun when it is 1: "Total 1 resource: 0 missing schemas, 1 success case, 0 failure cases". Add a table test for the singular, plural and zero cases and update the two integration test assertions.I have:
./nix.sh flake checkto ensure this PR is ready for review.Linked a PR or a docs tracking issue to document this change.Addedbackport release-x.ylabels to auto-backport this PR.Need help with this checklist? See the cheat sheet.