-
Notifications
You must be signed in to change notification settings - Fork 36
add more validate tests #491
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
5d7e394 to
859ae4a
Compare
| var errWithSource spiceerrors.WithSourceError | ||
| if errors.As(err, &errWithSource) { | ||
| ouputErrorWithSource(validateContents, errWithSource) | ||
| outputErrorWithSource(toPrint, validateContents, errWithSource) |
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.
Not sure how to hit this code path yet
|
|
||
| // Output errors | ||
| outputDeveloperErrorsWithLineOffset(validateContents, devErrs.InputErrors, schemaOffset) | ||
| outputDeveloperErrorsWithLineOffset(toPrint, validateContents, devErrs.InputErrors, schemaOffset) |
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.
Not sure how to hit this code path yet
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.
IIRC this and the other are some combination of compilation errors and typesystem errors. Grepping for DeveloperErr and ErrorWithSource should probably turn something up.
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.
JK you've already got some of that kind of thing in there...
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.
Covered in test here: #494
859ae4a to
b8f5a75
Compare
tstirrat15
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.
I like where this is headed
|
|
||
| // Output errors | ||
| outputDeveloperErrorsWithLineOffset(validateContents, devErrs.InputErrors, schemaOffset) | ||
| outputDeveloperErrorsWithLineOffset(toPrint, validateContents, devErrs.InputErrors, schemaOffset) |
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.
IIRC this and the other are some combination of compilation errors and typesystem errors. Grepping for DeveloperErr and ErrorWithSource should probably turn something up.
|
|
||
| // Output errors | ||
| outputDeveloperErrorsWithLineOffset(validateContents, devErrs.InputErrors, schemaOffset) | ||
| outputDeveloperErrorsWithLineOffset(toPrint, validateContents, devErrs.InputErrors, schemaOffset) |
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.
JK you've already got some of that kind of thing in there...
In preparation for #478, adding more tests to ensure we don't break existing behavior.