Skip to content

Latest commit

 

History

History
21 lines (20 loc) · 2.33 KB

MaintainabilityRules.md

File metadata and controls

21 lines (20 loc) · 2.33 KB

Maintainability Rules (SA1400-)

Rules which improve code maintainability.

Identifier Name Description
SA1119 StatementMustNotUseUnnecessaryParenthesis A C# statement contains parenthesis which are unnecessary and should be removed.
SA1400 AccessModifierMustBeDeclared The access modifier for a C# element has not been explicitly defined.
SA1401 FieldsMustBePrivate A field within a C# class has an access modifier other than private.
SA1402 FileMayOnlyContainASingleType A C# code file contains more than one unique type.
SA1403 FileMayOnlyContainASingleNamespace A C# code file contains more than one namespace.
SA1404 CodeAnalysisSuppressionMustHaveJustification A Code Analysis SuppressMessage attribute does not include a justification.
SA1405 DebugAssertMustProvideMessageText A call to Debug.Assert in C# code does not include a descriptive message.
SA1406 DebugFailMustProvideMessageText A call to Debug.Fail in C# code does not include a descriptive message.
SA1407 ArithmeticExpressionsMustDeclarePrecedence A C# statement contains a complex arithmetic expression which omits parenthesis around operators.
SA1408 ConditionalExpressionsMustDeclarePrecedence A C# statement contains a complex conditional expression which omits parenthesis around operators.
SA1409 RemoveUnnecessaryCode A C# file contains code which is unnecessary and can be removed without changing the overall logic of the code.
SA1410 RemoveDelegateParenthesisWhenPossible A call to a C# anonymous method does not contain any method parameters, yet the statement still includes parenthesis.
SA1411 AttributeConstructorMustNotUseUnnecessaryParenthesis An attribute declaration does not contain any parameters, yet it still includes parenthesis.
SA1412 StoreFilesAsUtf8 The encoding of the file is not UTF-8 with byte order mark.
SA1413 UseTrailingCommasInMultiLineInitializers A multi-line initializer should use a comma on the last item.
SA1414 TupleTypesInSignaturesShouldHaveElementNames Tuple types appearing in member declarations should have explicitly named tuple elements.