Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ignoring rule errors #18

Open
1 of 3 tasks
croesch opened this issue Jul 16, 2019 · 2 comments
Open
1 of 3 tasks

Allow ignoring rule errors #18

croesch opened this issue Jul 16, 2019 · 2 comments

Comments

@croesch
Copy link
Contributor

croesch commented Jul 16, 2019

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
  • 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? ;-)

@codecholeric
Copy link
Contributor

There is actually an issue with a similar focus: TNG/ArchUnit#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.

@bvedrenne bvedrenne mentioned this issue Dec 21, 2021
2 tasks
@tiffmaelite
Copy link

@croesch given that #48 does not fully fix this issue you opened, do you think your request is still relevant?

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

No branches or pull requests

3 participants