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

Refactor RuleBuilder to allow for extension of Rules #6605

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbonzohln
Copy link
Contributor

I was trying to add a custom rule to our project, where we could allow exporting of all Groups instead of individual Groups, and found it difficult to implement. This was because most of the classes were in package or private scope, so I would need to re-implement (copy) existing HAPI classes into my project. By making the classes protected, I'm able to easily create a custom rule. There may be more that could be refactored, but this got me to where I needed the code.

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.49%. Comparing base (406db33) to head (ba2f685).
Report is 157 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6605      +/-   ##
============================================
- Coverage     83.54%   83.49%   -0.05%     
- Complexity    27432    28551    +1119     
============================================
  Files          1707     1797      +90     
  Lines        106185   111122    +4937     
  Branches      13397    13965     +568     
============================================
+ Hits          88710    92779    +4069     
- Misses        11750    12362     +612     
- Partials       5725     5981     +256     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamesagnew
Copy link
Collaborator

This is a neat idea, we didn't really think much about extensibility when we designed this framework.

Would you be willing to add an example of such a custom rule? I think this would be greatly enhanced if we had documentation to show how someone would use this.

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.

2 participants