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
At the moment, when using the PlantUML feature to create ArchRules from PlantUML component diagrams every class must be contained in the diagram or an IllegalStateException is thrown. The reason behind this is that we want to prevent users from missing classes or creating tests that in fact only cover a little part of the code base while getting a false sense of security.
This has one severe problem though: In legacy code bases there might be many classes that should be contained by the diagram, but are not at the moment. Getting an IllegalStateException thrown prevents the use of FreezingArchRule to freeze this legacy code state and improve it piece by piece. The only way would be to either create a legacy bucket in the diagram, which is tedious, or to exclude all the classes from the rule creating a big black hole where classes are uncovered by the rule and can further degenerate.
We should change classes not contained in the diagram from an IllegalStateException to a regular rule violation to improve this.
The text was updated successfully, but these errors were encountered:
So far, when using `PlantUmlArchCondition`, if a class is contained in
no component or multiple components an exception is thrown. This makes
it impossible to freeze the current state with `FreezingArchRule`,
because the test will simply crash hard.
We now replace these exceptions by regular rule violations. That way
they can be treated like any other architecture violation and can also
be frozen with `FreezingArchRule`.
Resolves: #960
At the moment, when using the PlantUML feature to create
ArchRules
from PlantUML component diagrams every class must be contained in the diagram or anIllegalStateException
is thrown. The reason behind this is that we want to prevent users from missing classes or creating tests that in fact only cover a little part of the code base while getting a false sense of security.This has one severe problem though: In legacy code bases there might be many classes that should be contained by the diagram, but are not at the moment. Getting an
IllegalStateException
thrown prevents the use ofFreezingArchRule
to freeze this legacy code state and improve it piece by piece. The only way would be to either create a legacy bucket in the diagram, which is tedious, or to exclude all the classes from the rule creating a big black hole where classes are uncovered by the rule and can further degenerate.We should change classes not contained in the diagram from an
IllegalStateException
to a regular rule violation to improve this.The text was updated successfully, but these errors were encountered: