You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the way Event Handlers work is that we go Allowed first down to Violation.
When a Violation occurs, we don't know exactly why. We can only say "It was not allowed". We sometimes get exactly this question and it is more common with the introduction of private collectors and internal classes.
As a result, we have many short-circuits in AllowDependencyHandler, to skip all those cases.
My proposal is to invert this principle and instead have multiple Violation handlers. Like DependsOnInternalClassHandler or DependsOnPrivatelyCollectedTokenHandler. These would run first, thus making the short circuits in AllowDependencyHandler no longer required.
As a consequence, rules could now also have a reason field, that would give a clear output indication of why the violation occurred in the first place and possibly how to fix it. Basically to follow the standard way many other SA tools are utilizing.
The text was updated successfully, but these errors were encountered:
Right now the way Event Handlers work is that we go
Allowed
first down toViolation
.When a Violation occurs, we don't know exactly why. We can only say "It was not allowed". We sometimes get exactly this question and it is more common with the introduction of
private
collectors andinternal
classes.As a result, we have many short-circuits in
AllowDependencyHandler
, to skip all those cases.My proposal is to invert this principle and instead have multiple
Violation
handlers. LikeDependsOnInternalClassHandler
orDependsOnPrivatelyCollectedTokenHandler
. These would run first, thus making the short circuits inAllowDependencyHandler
no longer required.As a consequence, rules could now also have a
reason
field, that would give a clear output indication of why the violation occurred in the first place and possibly how to fix it. Basically to follow the standard way many other SA tools are utilizing.The text was updated successfully, but these errors were encountered: