Issue #20: Enhance error reporting#21
Open
OnkelTem wants to merge 1 commit intoromaricdrigon:masterfrom
Open
Conversation
romaricdrigon
requested changes
Mar 18, 2019
Owner
romaricdrigon
left a comment
There was a problem hiding this comment.
Thank you for your work, I added some comments. If you need help with the tests, I can assist once I get what the code is doing :)
| private $messages = []; | ||
|
|
||
| public function __construct($node_path, $message) | ||
| public function __construct($node_path, $messages, $paths) |
Owner
There was a problem hiding this comment.
I'm not sure of why we need to pass an array of messages? The code is much less visible and I'm not sure current($messages) will always return what we expect. What about having $message (string) and an extra parameter $previousMessages(array) ?
Owner
There was a problem hiding this comment.
And it looks like there's a small indentation glitch just in front of the constructor.
| /** | ||
| * @throws Exception\NodeValidatorException | ||
| */ | ||
| public function validateNode($name, $type, $node, $data, $path = '') |
| return $this->messages; | ||
| } | ||
|
|
||
| public function getReport() |
Owner
There was a problem hiding this comment.
i'm not sure to understand what getReport()is giving? As it will become part of MetaYaml API, there should be a test over it.
This file contains hidden or 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
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.
See #20