MaintainabilityRules.md

February 24, 2019 ยท View on GitHub

Maintainability Rules (SA1400-)

Rules which improve code maintainability.

IdentifierNameDescription
SA1119StatementMustNotUseUnnecessaryParenthesisA C# statement contains parenthesis which are unnecessary and should be removed.
SA1400AccessModifierMustBeDeclaredThe access modifier for a C# element has not been explicitly defined.
SA1401FieldsMustBePrivateA field within a C# class has an access modifier other than private.
SA1402FileMayOnlyContainASingleTypeA C# code file contains more than one unique type.
SA1403FileMayOnlyContainASingleNamespaceA C# code file contains more than one namespace.
SA1404CodeAnalysisSuppressionMustHaveJustificationA Code Analysis SuppressMessage attribute does not include a justification.
SA1405DebugAssertMustProvideMessageTextA call to Debug.Assert in C# code does not include a descriptive message.
SA1406DebugFailMustProvideMessageTextA call to Debug.Fail in C# code does not include a descriptive message.
SA1407ArithmeticExpressionsMustDeclarePrecedenceA C# statement contains a complex arithmetic expression which omits parenthesis around operators.
SA1408ConditionalExpressionsMustDeclarePrecedenceA C# statement contains a complex conditional expression which omits parenthesis around operators.
SA1409RemoveUnnecessaryCodeA C# file contains code which is unnecessary and can be removed without changing the overall logic of the code.
SA1410RemoveDelegateParenthesisWhenPossibleA call to a C# anonymous method does not contain any method parameters, yet the statement still includes parenthesis.
SA1411AttributeConstructorMustNotUseUnnecessaryParenthesisAn attribute declaration does not contain any parameters, yet it still includes parenthesis.
SA1412StoreFilesAsUtf8The encoding of the file is not UTF-8 with byte order mark.
SA1413UseTrailingCommasInMultiLineInitializersA multi-line initializer should use a comma on the last item.
SA1414TupleTypesInSignaturesShouldHaveElementNamesTuple types appearing in member declarations should have explicitly named tuple elements.