Code formatting: Possibility to ignore some options?
Hello,
I appreciate the Resharper possibility regarding the code formatting style, but when reformatting code using the code cleanup feature some options are somewhat obstructive. Is there a way to exclude some options when reformatting code when cleaning up code?
One example is the option C# / Formatting Style / Spaces / Other / Before end of line comment.
This option gives the possibility to insert or remove one space before the comment at the end of a line:
var x = 4; // x = 4
versus
var x = 4;// x = 4
(Mind the space beween ; and //)
This option destroys end of line comments which are formatted like this:
var x = 4; //Initialisation
var result = CallOfSophisticatedMethod(x); //Do the sophisticated stuff
PresentResult(result); //Display result to user
This example is just one of many. In generally I'm missing the possibility to mark a setting or a group of settings to be ignored when reformatting my code.
Can anyone help me?
THIA,
Roman
Please sign in to leave a comment.
Anything new regarding my question some months ago? Does anyone else have the same problem / wish to be able to ignore some reformatting options?
THIA,
Roman
Hello Roman,
There is no related setting in ReSharper options. So, there is no way to disable such behavior.
Thanks!
Hello Alexander,
Sad to hear this, but that's what I suspected. Thanks for your answer, I'll put a feature request for this.
Bye,
Roman