Descriptive error with exact path in json - #48
Open
ankuagarwal wants to merge 7 commits into
Open
Conversation
- lint() method in LintRunner will lint the files without returning anything - ReportRunner will generate the report based upon input error data
Fixed test cases Updated readme
zsmoore
requested changes
Jun 6, 2019
PawanHegde
requested changes
Jun 6, 2019
zsmoore
requested changes
Jun 17, 2019
| public String report(T t) throws NoReportSetException { | ||
| if (reportMessage == null) { | ||
| throw new NoReportSetException("No Report Message Set When Lint Error Found"); | ||
| throw new NoReportSetException("No Report Message Set When Lint LintError Found"); |
Owner
There was a problem hiding this comment.
this should be when LintError found not Lint LintError
| */ | ||
| private String reportMessage; | ||
|
|
||
| private String path; |
| return wrappedObject; | ||
| } | ||
|
|
||
| public static String getPath(WrappedObject element) { |
Owner
There was a problem hiding this comment.
can we make this a list instead of string separated by a '.' as discussed offline
|
|
||
| @Test | ||
| public void lintRunnerShouldValidErrorForWrappedPrimitive() throws Exception { | ||
| LintRule lintRule = new LintRule.Builder() |
Owner
There was a problem hiding this comment.
Can pull out lintRule and hold on as a LintRule.Builder and only make implementation to avoid all the duplication in these tests
|
|
||
| public class LintError { | ||
|
|
||
| private final String jsonPath; |
Owner
There was a problem hiding this comment.
Can we use this in the RB? We are allowing us to get this info but not using it at all in reporting
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.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
Currently we get all the error message caused in a file. It is difficult for user to pin point the exact location.
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Updated Doc for more info.
Other information: