Making my enum stylish

Sep 8, 2012 at 8:30 PM
Edited Sep 8, 2012 at 8:46 PM

Never mind. Got it.

Coordinator
Sep 8, 2012 at 8:50 PM
Press return after the comma.

They also need a summary in front of each enum value.


~A.

On 8 Sep 2012, at 21:30, jwgoerlich <notifications@codeplex.com> wrote:

From: jwgoerlich

Hello,

I have an enum below that is generating the StyleCop warning: "SA1516: Adjacent elements must be separated by a blank line." What is the proper way of representing this enum in code, such that it meets StyleCop's standards?

Wolfgang

/// <summary>
/// The forms of encoding to use: None, Base16, Base32, Base64 
/// </summary>
[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1602:EnumerationItemsMustBeDocumented", Justification = "The flag names are self-explanatory.")]
public enum encodingMethod 
{
    None, 
    Base16, 
    Base32, 
    Base64 
};

Jan 6, 2015 at 7:29 PM
I tried what you said. I even tried putting extra newlines all over the place but it still gives the same error. For reference here is my code (I turned off the documentation rule):
        enum WeatherType
        {
            conditions,
            forecast
        };
I thought you meant this:
        enum WeatherType
        {
            conditions,

            forecast
        };
But that calls the cop on me too. Any number of newlines all over the place still won't satiate its hunger. What should my code look like?