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

Add processAllRules option. #56

Merged
merged 4 commits into from
Oct 17, 2016

Conversation

jdavisp3
Copy link
Collaborator

This PR adds a processAllRules option. It is optional and if not specified or False the rules are processed as now. If True, instead of stopping at the first matching rule, all rules are processed and all matching rules will be applied.

Fixes #52. Fixes #19.

@@ -199,6 +220,11 @@ public static Rules fromConfig(Config config) {
displayMaterialChanges = config.getBoolean("displayMaterialChanges");
}

boolean processAllRules = false;
if (config.hasPath("processAllRules")) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate to say this, but can you please switch to - based convention for the config name? I wanted to do the same for displayMaterialChanges as well. Pretty please!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, no problem, I will do that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: 391fd0c

Copy link
Owner

@ashwanthkumar ashwanthkumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a unit test case for more than 1 matching rule in RulesTest?

@ashwanthkumar
Copy link
Owner

Build failed because of a configuration issue. Fixed that re-triggered it.

@jdavisp3
Copy link
Collaborator Author

Can you please add a unit test case for more than 1 matching rule in RulesTest?

I totally thought I did that but apparently I dreamed it. Added a test in 735a74e.

@ashwanthkumar
Copy link
Owner

ashwanthkumar commented Oct 17, 2016

@jdavisp3 The changes LGTM. One final thing, do you like to add the note about this feature in the README and also to docs to the list of supported configurations? Or I can do that as well. Let me know what you think.

@jdavisp3
Copy link
Collaborator Author

Thanks @ashwanthkumar, I will totally update the README and docs, thanks!

@jdavisp3
Copy link
Collaborator Author

Ok, docs and README updated in 0bbc459.

@ashwanthkumar ashwanthkumar merged commit 0deb3cf into ashwanthkumar:master Oct 17, 2016
@ashwanthkumar
Copy link
Owner

Thanks @jdavisp3

@jdavisp3 jdavisp3 deleted the continue-processing branch October 17, 2016 20:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants