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

Throw error if config is not valid JSON #26

Merged
merged 2 commits into from
Jan 20, 2018

Conversation

maurelian
Copy link
Contributor

@maurelian maurelian commented Jan 19, 2018

What I did:

Made it so that an error is thrown if the config file is invalid JSON.

Why I did it

I think it's dangerous and misleading to silently handle the error by using an empty config object.

How to verify it

I wasn't sure how to test this, since all the tests use linter.processStr(), which takes a config, but in practice solhint.js looks for a file.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 99.644% when pulling 2bd8202 on maurelian:error-on-invalid-config into 2e87b2c on protofire:master.

@idrabenia idrabenia merged commit 1a92c76 into protofire:master Jan 20, 2018
@idrabenia idrabenia added this to the v1.1.10 milestone Jan 20, 2018
@idrabenia
Copy link
Contributor

idrabenia commented Jan 20, 2018

Hi @maurelian ,

You changes is now available in v1.1.10.

Thank you for the contribution!
- Ilya

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.

3 participants