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 config error reporting #56

Merged
merged 2 commits into from
Oct 22, 2020

Conversation

Stupremee
Copy link
Member

Currently, config errors, that occur while reading the config or finding its path will cause a panic.
Now they will be reported to the user.

Secondly, errors that occur because of invalid Toml, are now reported with using rslint_errors and a primary label (if line and column info is available).

Here are some pictures:
image
image
image

Resolves #47

@RDambrosio016
Copy link
Collaborator

Thank you for the PR!
I tried doing this before when implementing config, but for some reason the ranges were a bit broke, but that does not seem to be the case now for some reason

@RDambrosio016 RDambrosio016 added A-errors C-enhancement Category: enhancement T-CLI This issue primarily relates to the CLI (rslint_cli) labels Oct 22, 2020
@Stupremee
Copy link
Member Author

Stupremee commented Oct 22, 2020

toml just returns a line and column index so you have to convert it. Not sure if this was your issue

@RDambrosio016
Copy link
Collaborator

Oh yeah that may have been dumb from me

@RDambrosio016
Copy link
Collaborator

LGTM

@RDambrosio016 RDambrosio016 merged commit d635094 into rslint:master Oct 22, 2020
@Stupremee Stupremee deleted the better-config-errors branch October 22, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-errors C-enhancement Category: enhancement T-CLI This issue primarily relates to the CLI (rslint_cli)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission errors should not panic
2 participants