Skip to content

Fix error_on_unformatted and skip_children override#2600

Merged
nrc merged 1 commit intorust-lang:masterfrom
i1skn:error_on_unformatted
Apr 6, 2018
Merged

Fix error_on_unformatted and skip_children override#2600
nrc merged 1 commit intorust-lang:masterfrom
i1skn:error_on_unformatted

Conversation

@i1skn
Copy link
Copy Markdown
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
Copy Markdown
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