Skip to content

Fix And/Or not being commutative when combining rules - #504

Merged
alexanderlinne merged 5 commits into
TNG:mainfrom
brandhuf:commutative-and-or
Oct 9, 2026
Merged

alexanderlinne merged 5 commits into
TNG:mainfrom
brandhuf:commutative-and-or

Conversation

@brandhuf

@brandhuf brandhuf commented Oct 2, 2026

Copy link
Copy Markdown
Contributor
  • ArchRule.And/Or and SliceRule.And/Or now pass this instead of _ruleCreator to CombinedArchRule and CombinedArchRuleDefinition
  • ArchRuleCreator.HasNoViolations now correctly returns false when RequirePositiveResults is set but no objects matched the predicate

Signed-off-by: Fritz Brandhuber <fritz.brandhuber@tngtech.com>
Signed-off-by: Fritz Brandhuber <fritz.brandhuber@tngtech.com>
@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.45%. Comparing base (9c16d41) to head (bf08e59).

Files with missing lines Patch % Lines
ArchUnitNET/Fluent/ArchRuleCreator.cs 94.44% 1 Missing ⚠️
ArchUnitNET/Fluent/CombinedArchRuleCreator.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #504      +/-   ##
==========================================
+ Coverage   86.41%   86.45%   +0.04%     
==========================================
  Files         261      261              
  Lines       12600    12590      -10     
  Branches     1229     1226       -3     
==========================================
- Hits        10888    10885       -3     
+ Misses       1372     1366       -6     
+ Partials      340      339       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread ArchUnitNET/Fluent/ArchRuleCreator.cs Resolved
…nothing

Signed-off-by: Fritz Brandhuber <fritz.brandhuber@tngtech.com>
Comment thread ArchUnitNET/Fluent/ArchRuleCreator.cs Resolved
Signed-off-by: Fritz Brandhuber <fritz.brandhuber@tngtech.com>
@alexanderlinne
alexanderlinne merged commit d4641e2 into TNG:main Oct 9, 2026
10 checks passed
@brandhuf
brandhuf deleted the commutative-and-or branch October 16, 2026 12:02
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.

3 participants