Skip to content

feat: provide catch-all function to process dep rule#255

Closed
rainerhahnekamp wants to merge 5 commits into
softarc-consulting:mainfrom
rainerhahnekamp:fix/pr-246-review-feedback
Closed

feat: provide catch-all function to process dep rule#255
rainerhahnekamp wants to merge 5 commits into
softarc-consulting:mainfrom
rainerhahnekamp:fix/pr-246-review-feedback

Conversation

@rainerhahnekamp

Copy link
Copy Markdown
Collaborator

Credit goes to @sdurnov who did the original implementation in #246. Their commits are preserved as-is; a final fix commit addresses the review feedback.

Summary

  • Adds fromTags and toTags to DependencyCheckContext so matcher functions can inspect the full tag sets of both modules
  • Restores RuleMatcherFn as an intersection type ({ from: string; to: string } & DependencyCheckContext) rather than flattening from/to into the context interface
  • Removes the redundant tos parameter from isDependencyAllowed — the function now iterates context.toTags directly, eliminating duplicated data at every call site

Test plan

  • packages/core/src/lib/checks/tests/is-dependency-allowed.spec.ts — all 30 tests pass
  • Full test suite passes (354 tests)

🤖 Generated with Claude Code

Дурнов Сергей Юрьевич and others added 5 commits March 5, 2026 16:06
… param

- Remove from/to from DependencyCheckContext; restore to intersection type
- Add fromTags/toTags to DependencyCheckContext
- Remove redundant tos param from isDependencyAllowed; use context.toTags
- Drop dummy from/to values in checkForDependencyRuleViolation
- Update tests to match new signatures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@rainerhahnekamp

Copy link
Copy Markdown
Collaborator Author

Superseded by a cleaner approach: #246 was squash-merged to preserve @sdurnov's authorship; the review fix follows in a separate PR.

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