arch-unit-maven-plugin
arch-unit-maven-plugin copied to clipboard
Allow ignoring rule errors
Summary
Regarding #17 it would be nice to have something like
<failOnPriority>LOW|MEDIUM|HIGH</failOnPriority>
to let the rules run, check, but give warnings instead of errors if the failOnPriority
is set higher than the rules priority.
Type of Issue
It is a :
- [ ] bug
- [x] request
- [ ] question regarding the documentation
Motivation
#17 allows skipping a certain rule which allows adding new rules to the ArchUnit Maven Plugin configuration for a large set of artifacts: you could just skip the rule in all artifacts where it doesn't pass (at the moment).
But normally what you don't see is hard to remember, so it would be nice to run the rule, see the problem but still have the build passing.
Current Behavior
You can either skip a rule or stick to it with all the consequences like failing builds.
Expected Behavior
Allow successful builds even if a rule fails.
ArchUnit has the priority available for the rules - is it used somewhere? Normally I would expect that you could define a certain level (like with logging) and rule violations above that level make the build fail and rule violations below that level appear as warnings.
What's your opinion? And would you rather add it to ArchUnit and make it available here (maybe with the same problems like the configuration file as mentioned in #13 ) or would you completely add the functionality here in the Maven plugin? Or even not at all? ;-)
There is actually an issue with a similar focus: https://github.com/TNG/ArchUnit/issues/66
Some parts seemed unfeasible, like configuring a threshold for violations (since you can run the tests too individually), but I could image to add a possibility to e.g. not fail rules that have priority low.
@croesch given that https://github.com/societe-generale/arch-unit-maven-plugin/pull/48 does not fully fix this issue you opened, do you think your request is still relevant?