StyleCop Code Cleanup Settings

Answered

Where is the documentation for the StyleCop Code Cleanup Settings?

There is little explanation on what each setting does. Moreover, some are cryptic. For example, what does this mean?

    Add/Remove braces for single statements in "if-else", "for", "foreach"...

Does it both add and remove braces? If the statement has no braces, are braces add and if the statement has braces, are braces removed?

A similar question applies to Use explicit or implicit modifier definition for types -- Aren't explicit and implicit completely different? These seem mutually exclusive options. If I use explicit, then I cannot also use implicit.

1 comment
Comment actions Permalink
Official comment

Hello Jeffery,

The settings, shown on the screenshot, are ReSharper ones, not StyleCop ones. "StyleCop" here is just the name of Code Cleanup profile, you may add a custom one with any name you like by hitting "Add" button.

As for Add/Remove braces for single statements in "if-else", "for", "foreach"..: it is a part of Code styles section, so you may find related settings (which will be applied if the corresponding checkbox is ticked) here ReSharper | Options | Code Editing | C# | Code Style (more info here https://www.jetbrains.com/help/resharper/2016.2/Reference__Code_Style.html).

Thanks! 

Please sign in to leave a comment.