Skip to content

Reject wildcard targets for mutating operations - #38

Merged
MikeGarde merged 1 commit into
mainfrom
fix/set-with-wildcard
Jul 28, 2026
Merged

Reject wildcard targets for mutating operations#38
MikeGarde merged 1 commit into
mainfrom
fix/set-with-wildcard

Conversation

@MikeGarde

Copy link
Copy Markdown
Owner
  • Document and enforce that wildcard expansion is read-only and will be rejected for --set/--delete in the policy logic.
  • In src/qualifying_rules.rs, reject wildcard target keys for --set/--delete, require explicit targeting, and return RuleViolationError on detection.
  • In tests/wildcard.rs, add coverage to reject wildcard keys for mutating ops and verify no file changes; include tests for matching and non-matching patterns and check the exact error message, with rationale that wildcards may match zero or more keys.

- Document and enforce that wildcard expansion is read-only and will be rejected for `--set`/`--delete` in the policy logic.
- In `src/qualifying_rules.rs`, reject wildcard target keys for `--set`/`--delete`, require explicit targeting, and return `RuleViolationError` on detection.
- In `tests/wildcard.rs`, add coverage to reject wildcard keys for mutating ops and verify no file changes; include tests for matching and non-matching patterns and check the exact error message, with rationale that wildcards may match zero or more keys.
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/main.rs 97.61% <ø> (ø)
src/qualifying_rules.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MikeGarde
MikeGarde merged commit 3e69cea into main Jul 28, 2026
6 checks passed
@MikeGarde
MikeGarde deleted the fix/set-with-wildcard branch July 28, 2026 13:25
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.

1 participant