Skip to content
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

Improve error scoping #116

Merged
merged 26 commits into from
Jan 17, 2023
Merged

Improve error scoping #116

merged 26 commits into from
Jan 17, 2023

Conversation

mskelton
Copy link
Member

@mskelton mskelton commented Jan 15, 2023

Fixes #113

Improves error message scoping so that errors are less obtrusive and more accurate to the problem. See the before/after screenshots below for a preview of what this changes in the output.

This makes it significantly easier to both find the actual issue as well as not overwhelm users. I noticed it was very distracting with test.skip causing the entire test to show as errored when I really only want it to show on the .skip portion of the test.

Most of this change is adding validation to test to ensure the error messages are at the proper location. The changes to the source rules in most cases was just changing node to node.callee in the context.report method.

Before

image

After

image

@mskelton mskelton marked this pull request as ready for review January 15, 2023 23:45
@mskelton mskelton merged commit e5958a0 into main Jan 17, 2023
@mskelton mskelton deleted the error-scope branch January 17, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better scope for error message nodes
1 participant