Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share All Resharper code formatting/inspection options

As denoted in This Article ReSharper's .sln.DotSettings file contains only those settings which values changed from default ones. Is there a way to store all the code editting and code inspection settings in a team-shared layer, regardless of the value being changed or default?

The only way to do this I see is changing each and every value and switching it back (so all of them end up in .sln.DotSettings file), however this seems to be quite a time-consuming task.

The problem I'm trying to avoid is as follows:

Suppose a team has 2 developers, say Jessika and John, and they decide that they are OK with Resharper's default to prefix private fields with with an underscore:

int _myPrivateField = 1;

So they are not changing the "Instance fields(private)" setting under "C# Naming Style" section and check in the .sln.DotSettings file. However, when Jessica checks out the source code on her home laptop it Resharper still suggests using

 int myPrivateField = 1;

because her computer has its setting changed to have no prefix, saved as "Save to this computer". As denoted in Resharper's docs if a "This Computer" layer has a value for a setting, whereas the other layers don't the value will be applied (see the middle green setting in this picture: http://blogs.jetbrains.com/dotnet/wp-content/uploads/2012/08/layers3.png

like image 382
Isantipov Avatar asked Feb 08 '13 18:02

Isantipov


1 Answers

Regrettably, at the moment we can offer no option other than changing options one by one and saving them in the requisite layers. We are aware that this approach is inconvenient, and are in discussions as to how to best handle this.

like image 122
Dmitri Nesteruk Avatar answered Oct 03 '22 08:10

Dmitri Nesteruk