-
-
Notifications
You must be signed in to change notification settings - Fork 5
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 publication validation helpers to single class #800
Merged
caendesilva
merged 66 commits into
publications-feature
from
refactor-publication-validation
Jan 2, 2023
Merged
Refactor publication validation helpers to single class #800
caendesilva
merged 66 commits into
publications-feature
from
refactor-publication-validation
Jan 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## publications-feature #800 +/- ##
===========================================================
+ Coverage 99.36% 100.00% +0.63%
+ Complexity 2860 1428 -1432
===========================================================
Files 332 166 -166
Lines 7204 3599 -3605
===========================================================
- Hits 7158 3599 -3559
+ Misses 46 0 -46 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
5c36d31
to
db6e0ff
Compare
…null for the type In production, we only validate fields that actually exist (and thus have a publication type). The only reason it allowed null was to make it easier to test, but that's not a reason to add complexity. Instead we can just mock the publication type in the tests.
…required argument first
I don't see where this is needed (anymore) as the custom and dynamic rules are merged in with the defaults.
…develop into refactor-publication-validation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are quite a few paths and locations for validation rules and helpers making it a bit hard to get an overview on what's going on. This refactors all of that responsibility into a single class.