Skip to content

Fix error_on_unformatted and skip_children override #2600

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

Merged
merged 1 commit into from
Apr 6, 2018

Conversation

i1skn
Copy link
Contributor

@i1skn i1skn commented Apr 5, 2018

Currently, error_on_unformatted and skip_children options
specified in the config file are discarded.
This happens because CLI options have a higher priority,
but we coerce an absence of a bool option to false.
In this scenario, an absence of a bool option is indistinguishable
from explicitly set as false. We should coerce it to None instead,
so it does not override the one in the config file.

Issue: #2565

Currently, error_on_unformatted and skip_children options
specified in the config file are discarded.
This happens because CLI options have a higher priority,
but we coerce an absence of a `bool` option to `false`.
In this scenario, an absence of a `bool` option is indistinguishable
from explicetely set as `false`. We should coerce it to `None` instead,
so it does not override the one in the config file.
@nrc nrc merged commit 0a48018 into rust-lang:master Apr 6, 2018
@nrc
Copy link
Member

nrc commented Apr 6, 2018

Thank you!

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.

2 participants