Open rweisleder opened 4 years ago
Looks nice, but keep in mind that the list of violations might become quite long obscuring the possible solution :wink: Maybe Rule: ... Possible Solution: ... Current Violations: ... would be better to see it.
But we could also simply make it configurable. There is already com.tngtech.archunit.lang.ConfiguredMessageFormat
, which takes care of the final text representation. An archunit.properties
property like
messageFormat=com.my.CustomMessageFormat
Could maybe give the possibility to render the violations in any way you want (that was at least my original idea when I created ConfiguredMessageFormat
, that it could be an easy hook...)
When implementing #289 I wasn't sure how to write the rule text so that it's helpful and not too long, including
The produced AssertionError for violations isn't really nice to read:
Maybe we can extend the rule API so that rule authors can provide possible solutions for violations. I have something like Spring Boot's Failure Analyzer in mind. The error message could look like this: