Resharper falsely claims setting is overridden by editorconfig
I'm trying to have resharper format single-line expression braces as so:
// Resharper is formatting like this
int[] x = {1, 2, 3};
// I'd like it to format like this
int[] x = { 1, 2, 3 };
I have the option set in Resharper settings, however Resharper claims the option is being overridden by editorconfig.
However this option is not present in my editorconfig. If I _add_ the setting to my editorconfig it will be respected, but removing it results in the screenshot above.
It appears as though Resharper is reading this missing value in the editorconfig as “false” instead of “null” (or missing).
Please can you let me know how to make Resharper respect my preference here. I'd reather not have to add this line to the editorconfig of every single project I work on!
Please sign in to leave a comment.
Hello Duncan Blair, thank you for your question. Let's check, maybe there is some other .editorconfig file that contains this setting. Please try clicking on the "Edit" button at the top right in the Options dialog. After this, a window will open with the ability to edit the .editorconfig file, and the path to this file will be shown at the top. Is this file the same one you checked before?
I have the same problem in the newest version.





Desired format:
Resharper does this:
Resharper Options:
After clicking on Edit at the top right:
After changing this to false and clicking on Save:
It seems like Resharper is assuming default values if they are not present in the .editorconfig. In my opinion, values not present in .editorconfig should be overridable by the solution / personal or this computer options. However, I can add this setting with a value of true to solution / personal or this computer and it still enforces the value false because it thinks that's how it is defined in .editorconfig.
If this is intended behavior it should at least mark the setting as overridden by .editorconfig in the options dialog like for the settings that are present in .editorconfig. Thanks :)
Hello Michael Zehr,
Sorry for being late in this thread. Could you please share your initial .editorconfig before you've edited it with ReSharper UI?
Thank you.
Sure. In previous Resharper versions I was able to edit the formatting rules in the options and save them to “this computer” to overwrite the settings. Now changes in the options that are saved to “this computer” no longer take effect. If I apply the changes to the .editorconfig then it works.
Hello Michael Zehr,
thank you for the provided info.
However, I couldn't reproduce the problem you've specified with the provided .editorconfig file. With this file ReSharper doesn't wrap method calls after the opening parenthesis.
Could you please also provide the following info:
ReSharper | Manage Options | right-click on each layer | Export to file
.You can share the info using our service.
Thank you.
Here is the uploaded file:
Upload id: 2024_04_18_Kg6UKgwqX9YRtorM5uZXYr (file: OverriddenByEditorconfig.zip)
Thank you very much. For me personally it is no longer urgent or important, as the problem can be avoided by adding the setting directly in the .editorconfig. But in my opinion it is still a bug, because the designer indicates that it should not make a wrap, but then it makes a wrap anyway. The designer for the .editorconfig shows that wrapping is enabled. When saving, however, the option is added to the file. This means that the option was not previously present in the .editorconfig. So the standard designer should also show that the wrap is switched on. Settings that are not present in the .editorconfig and therefore fall back to default values should not overwrite the settings from This Computer etc.