Support xor groups with positional arguments - #647
ColumbusLabs wants to merge 3 commits into
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 72fd6a4957
ℹ️ 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".
72fd6a4 to
49c114d
Compare
|
Addressed in 49c114d after rebasing onto current master. Required positional XOR alternatives now satisfy both missing-positional validation paths when a peer flag is set, and XOR/AND overlap validation compares value identity rather than display names. Added regressions for both cases. Verified with |
49c114d to
76b9ff0
Compare
Fixes #255.
This validates
xorgroups against both flags and positional arguments owned by the same application or command node. A set positional can also satisfy required flags in its XOR group.Grouping directly from each node keeps command scopes independent: command-local conflicts are rejected, while a root flag and child positional may reuse the same group name without conflicting.
Tests cover root and command positionals, single-side success, cross-scope isolation, and required-XOR satisfaction.
Verification:
go test ./...go test -race ./..../bin/golangci-lint rungofmt/git diff --check