-
Notifications
You must be signed in to change notification settings - Fork 72
refactor: Make validator return joined errors #3513
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3513 +/- ##
===========================================
+ Coverage 78.46% 78.56% +0.10%
===========================================
Files 391 391
Lines 36424 36466 +42
===========================================
+ Hits 28577 28647 +70
+ Misses 6144 6123 -21
+ Partials 1703 1696 -7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 17 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
islamaliev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
AndrewSisley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and is a nice improvement - thanks Chris :)
## Relevant issue(s) Resolves sourcenetwork#2568 ## Description Validator functions currently were returning singular errors when encountered. With this change, they will instead return a list of errors that are encountered, by using the Join() function on the errors. To accommodate this change, additional logic was added to some validator functions to check for nil values being passed in. This is to avoid and prevent nil pointer exceptions. This is still in progress. ## Tasks - [x] I made sure the code is well commented, particularly hard-to-understand areas. - [x] I made sure the repository-held documentation is changed accordingly. - [x] I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in [tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)). - [x] I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ... ## How has this been tested? Specify the platform(s) on which this was tested: - Windows
Relevant issue(s)
Resolves #2568
Description
Validator functions currently were returning singular errors when encountered. With this change, they will instead return a list of errors that are encountered, by using the Join() function on the errors.
To accommodate this change, additional logic was added to some validator functions to check for nil values being passed in. This is to avoid and prevent nil pointer exceptions.
This is still in progress.
Tasks
How has this been tested?
Specify the platform(s) on which this was tested: