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

Run editor config options provider last #1559

Merged
merged 5 commits into from
Jul 15, 2019

Conversation

filipw
Copy link
Member

@filipw filipw commented Jul 15, 2019

fixes #1558

At the moment we run .editorconfig options provider before the formatting options provider (formatting options from omnisharp.json + config params).

It doesn't work, because the result is we load formatting settings from .editorconfig and then override them all (not just the "changed" ones) with defaults from here. This only applies to formatting rules, not other settings like naming conventions and code style.

Now, on our formatting endpoints it doesn't matter, since we reapply .editorconfig options on the fly again then - that's why the bug doesn't manifest itself on "normal" formatting, but for external code fixes, the formatting options do not correctly reflect .editorconfig.

The practical consequence is also that if you have an .editorconfig file, it will take precedence over anything else but I think this is fine.

Copy link
Member

@bjorkstromm bjorkstromm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@akshita31 akshita31 merged commit 5a5250b into OmniSharp:master Jul 15, 2019
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.

Code fixes don't respect formatting settings from EditorConfig
3 participants