parent
09e3ed6f26
commit
197b357419
|
@ -1,5 +1,36 @@
|
|||
is_global = true
|
||||
|
||||
## BizHawk internal rules
|
||||
|
||||
# Do not use anonymous delegates
|
||||
dotnet_diagnostic.BHI1001.severity = error
|
||||
# Do not use anonymous types (classes)
|
||||
dotnet_diagnostic.BHI1002.severity = error
|
||||
# Do not use query expression syntax
|
||||
dotnet_diagnostic.BHI1003.severity = error
|
||||
# Verbatim interpolated strings should begin $@, not @$
|
||||
dotnet_diagnostic.BHI1004.severity = error
|
||||
# Default branch of switch expression should throw InvalidOperationException/SwitchExpressionException or not throw
|
||||
dotnet_diagnostic.BHI1005.severity = error
|
||||
# Do not discard local variables
|
||||
dotnet_diagnostic.BHI1006.severity = error
|
||||
# Don't call this.GetType() in sealed type, use typeof operator
|
||||
dotnet_diagnostic.BHI1100.severity = error
|
||||
# Don't call this.GetType(), use typeof operator (or replace subtype check with better encapsulation)
|
||||
dotnet_diagnostic.BHI1101.severity = error
|
||||
# Don't call typeof(T).Name, use nameof operator
|
||||
dotnet_diagnostic.BHI1102.severity = error
|
||||
# Don't call typeof(T).ToString(), use nameof operator or typeof(T).FullName
|
||||
dotnet_diagnostic.BHI1103.severity = error
|
||||
# Check result of IDictionary.TryGetValue, or discard it if default(T) is desired
|
||||
dotnet_diagnostic.BHI1200.severity = error
|
||||
# Call to FirstOrDefault when elements are of a value type; FirstOrNull may have been intended
|
||||
dotnet_diagnostic.BHI3100.severity = error
|
||||
# Use .Order()/.OrderDescending() shorthand
|
||||
dotnet_diagnostic.BHI3101.severity = warning
|
||||
# Throw NotImplementedException from methods/props marked [FeatureNotImplemented]
|
||||
dotnet_diagnostic.BHI3300.severity = error
|
||||
|
||||
## Globalization rules
|
||||
|
||||
# Specify IFormatProvider
|
||||
|
@ -27,3 +58,516 @@ dotnet_diagnostic.CA1816.severity = none
|
|||
dotnet_diagnostic.CA2201.severity = suggestion
|
||||
# Implement serialization constructors
|
||||
dotnet_diagnostic.CA2229.severity = silent
|
||||
|
||||
## .NET DocumentationAnalyzers style rules
|
||||
|
||||
# Place text in paragraphs
|
||||
dotnet_diagnostic.DOC100.severity = silent
|
||||
# Use child blocks consistently
|
||||
dotnet_diagnostic.DOC101.severity = silent
|
||||
# Use child blocks consistently across elements of the same kind
|
||||
dotnet_diagnostic.DOC102.severity = silent
|
||||
# Use Unicode characters # unnecessary HTML entities also get picked up by CS1570, which seems more reliable
|
||||
dotnet_diagnostic.DOC103.severity = error
|
||||
# Prefer '<see langword="keyword"/>' to '<c>keyword</c>' for referencing language keywords
|
||||
dotnet_diagnostic.DOC104.severity = warning
|
||||
# Prefer '<paramref name="parameter"/>' to '<c>parameter</c>' for referencing parameters
|
||||
dotnet_diagnostic.DOC105.severity = warning
|
||||
# Prefer '<typeparamref name="type_parameter"/>' to '<c>type_parameter</c>' for referencing type parameters
|
||||
dotnet_diagnostic.DOC106.severity = warning
|
||||
# Prefer '<see cref="target"/>' to '<c>target</c>' for referencing code elements
|
||||
dotnet_diagnostic.DOC107.severity = warning
|
||||
# Avoid empty paragraphs
|
||||
dotnet_diagnostic.DOC108.severity = error
|
||||
|
||||
## .NET DocumentationAnalyzers portability rules
|
||||
|
||||
# Use XML documentation syntax
|
||||
dotnet_diagnostic.DOC200.severity = error
|
||||
# Item should have description
|
||||
dotnet_diagnostic.DOC201.severity = error
|
||||
# Use section elements correctly
|
||||
dotnet_diagnostic.DOC202.severity = error
|
||||
# Use block elements correctly
|
||||
dotnet_diagnostic.DOC203.severity = error
|
||||
# Use inline elements correctly # but this doesn't pick up <seealso/> in <summary/>, for example...
|
||||
dotnet_diagnostic.DOC204.severity = error
|
||||
# 'langword' attribute value should be a language keyword
|
||||
dotnet_diagnostic.DOC207.severity = error
|
||||
# 'href' attribute value should be a URI # a lot of false negatives with this one too
|
||||
dotnet_diagnostic.DOC209.severity = error
|
||||
|
||||
## Meziantou.Analyzers rules
|
||||
|
||||
# StringComparison is missing
|
||||
dotnet_diagnostic.MA0001.severity = silent
|
||||
# IEqualityComparer<string> or IComparer<string> is missing
|
||||
dotnet_diagnostic.MA0002.severity = silent
|
||||
# Add parameter name to improve readability
|
||||
dotnet_diagnostic.MA0003.severity = silent
|
||||
# Use Task.ConfigureAwait(false)
|
||||
dotnet_diagnostic.MA0004.severity = silent
|
||||
# Use Array.Empty<T>()
|
||||
dotnet_diagnostic.MA0005.severity = silent
|
||||
# Use String.Equals instead of equality operator
|
||||
dotnet_diagnostic.MA0006.severity = silent
|
||||
# Add a comma after the last value
|
||||
dotnet_diagnostic.MA0007.severity = silent
|
||||
# Add StructLayoutAttribute
|
||||
dotnet_diagnostic.MA0008.severity = silent
|
||||
# Add regex evaluation timeout
|
||||
dotnet_diagnostic.MA0009.severity = silent
|
||||
# Mark attributes with AttributeUsageAttribute
|
||||
dotnet_diagnostic.MA0010.severity = error
|
||||
# IFormatProvider is missing
|
||||
dotnet_diagnostic.MA0011.severity = silent
|
||||
# Do not raise reserved exception type
|
||||
dotnet_diagnostic.MA0012.severity = error
|
||||
# Types should not extend System.ApplicationException
|
||||
dotnet_diagnostic.MA0013.severity = error
|
||||
# Do not raise System.ApplicationException type
|
||||
dotnet_diagnostic.MA0014.severity = error
|
||||
# Specify the parameter name in ArgumentException
|
||||
dotnet_diagnostic.MA0015.severity = error
|
||||
# Prefer returning collection abstraction instead of implementation
|
||||
dotnet_diagnostic.MA0016.severity = silent
|
||||
# Abstract types should not have public or internal constructors
|
||||
dotnet_diagnostic.MA0017.severity = silent
|
||||
# Do not declare static members on generic types
|
||||
dotnet_diagnostic.MA0018.severity = error
|
||||
# Use EventArgs.Empty
|
||||
dotnet_diagnostic.MA0019.severity = error
|
||||
# Use direct methods instead of LINQ methods
|
||||
dotnet_diagnostic.MA0020.severity = error
|
||||
# Use StringComparer.GetHashCode instead of string.GetHashCode
|
||||
dotnet_diagnostic.MA0021.severity = silent
|
||||
# Return Task.FromResult instead of returning null
|
||||
dotnet_diagnostic.MA0022.severity = error
|
||||
# Add RegexOptions.ExplicitCapture
|
||||
dotnet_diagnostic.MA0023.severity = silent
|
||||
# Use an explicit StringComparer when possible
|
||||
dotnet_diagnostic.MA0024.severity = error
|
||||
# Implement the functionality instead of throwing NotImplementedException
|
||||
dotnet_diagnostic.MA0025.severity = silent
|
||||
# Fix TODO comment
|
||||
dotnet_diagnostic.MA0026.severity = silent
|
||||
# Do not remove original exception
|
||||
dotnet_diagnostic.MA0027.severity = error
|
||||
# Optimize StringBuilder usage
|
||||
dotnet_diagnostic.MA0028.severity = silent
|
||||
# Combine LINQ methods
|
||||
dotnet_diagnostic.MA0029.severity = error
|
||||
# Remove useless OrderBy call
|
||||
dotnet_diagnostic.MA0030.severity = error
|
||||
# Optimize Enumerable.Count() usage
|
||||
dotnet_diagnostic.MA0031.severity = error
|
||||
# Use an overload with a CancellationToken argument
|
||||
dotnet_diagnostic.MA0032.severity = silent
|
||||
# Do not tag instance fields with ThreadStaticAttribute
|
||||
dotnet_diagnostic.MA0033.severity = error
|
||||
# Do not use dangerous threading methods
|
||||
dotnet_diagnostic.MA0035.severity = error
|
||||
# Make class static
|
||||
dotnet_diagnostic.MA0036.severity = silent
|
||||
# Remove empty statement
|
||||
dotnet_diagnostic.MA0037.severity = error
|
||||
# Make method static
|
||||
dotnet_diagnostic.MA0038.severity = silent
|
||||
# Do not write your own certificate validation method
|
||||
dotnet_diagnostic.MA0039.severity = error
|
||||
# Flow the cancellation token
|
||||
dotnet_diagnostic.MA0040.severity = silent
|
||||
# Make property static
|
||||
dotnet_diagnostic.MA0041.severity = silent
|
||||
# Do not use blocking calls in an async method
|
||||
dotnet_diagnostic.MA0042.severity = error
|
||||
# Use nameof operator in ArgumentException
|
||||
dotnet_diagnostic.MA0043.severity = error
|
||||
# Remove useless ToString call
|
||||
dotnet_diagnostic.MA0044.severity = silent
|
||||
# Do not use blocking call in a sync method (need to make containing method async)
|
||||
dotnet_diagnostic.MA0045.severity = silent
|
||||
# Use EventHandler<T> to declare events
|
||||
dotnet_diagnostic.MA0046.severity = silent
|
||||
# Declare types in namespaces
|
||||
dotnet_diagnostic.MA0047.severity = error
|
||||
# File name must match type name
|
||||
dotnet_diagnostic.MA0048.severity = silent
|
||||
# Type name should not match containing namespace
|
||||
dotnet_diagnostic.MA0049.severity = silent
|
||||
# Validate arguments correctly in iterator methods
|
||||
dotnet_diagnostic.MA0050.severity = error
|
||||
# Method is too long
|
||||
dotnet_diagnostic.MA0051.severity = silent
|
||||
# Replace constant Enum.ToString with nameof
|
||||
dotnet_diagnostic.MA0052.severity = error
|
||||
# Make class sealed
|
||||
dotnet_diagnostic.MA0053.severity = silent
|
||||
# Embed the caught exception as innerException
|
||||
dotnet_diagnostic.MA0054.severity = error
|
||||
# Do not use finalizer
|
||||
dotnet_diagnostic.MA0055.severity = silent
|
||||
# Do not call overridable members in constructor
|
||||
dotnet_diagnostic.MA0056.severity = silent
|
||||
# Class name should end with 'Attribute'
|
||||
dotnet_diagnostic.MA0057.severity = silent
|
||||
# Class name should end with 'Exception'
|
||||
dotnet_diagnostic.MA0058.severity = error
|
||||
# Class name should end with 'EventArgs'
|
||||
dotnet_diagnostic.MA0059.severity = silent
|
||||
# The value returned by Stream.Read/Stream.ReadAsync is not used
|
||||
dotnet_diagnostic.MA0060.severity = silent
|
||||
# Method overrides should not change parameter defaults
|
||||
dotnet_diagnostic.MA0061.severity = silent
|
||||
# Non-flags enums should not be marked with "FlagsAttribute"
|
||||
dotnet_diagnostic.MA0062.severity = silent
|
||||
# Use Where before OrderBy
|
||||
dotnet_diagnostic.MA0063.severity = error
|
||||
# Avoid locking on publicly accessible instance
|
||||
dotnet_diagnostic.MA0064.severity = silent
|
||||
# Default ValueType.Equals or HashCode is used for struct's equality
|
||||
dotnet_diagnostic.MA0065.severity = error
|
||||
# Hash table unfriendly type is used in a hash table
|
||||
dotnet_diagnostic.MA0066.severity = error
|
||||
# Use Guid.Empty
|
||||
dotnet_diagnostic.MA0067.severity = error
|
||||
# Invalid parameter name for nullable attribute
|
||||
dotnet_diagnostic.MA0068.severity = error
|
||||
# Non-constant static fields should not be visible
|
||||
dotnet_diagnostic.MA0069.severity = silent
|
||||
# Obsolete attributes should include explanations
|
||||
dotnet_diagnostic.MA0070.severity = silent
|
||||
# Avoid using redundant else
|
||||
dotnet_diagnostic.MA0071.severity = silent
|
||||
# Do not throw from a finally block
|
||||
dotnet_diagnostic.MA0072.severity = error
|
||||
# Avoid comparison with bool constant
|
||||
dotnet_diagnostic.MA0073.severity = silent
|
||||
# Avoid implicit culture-sensitive methods
|
||||
dotnet_diagnostic.MA0074.severity = silent
|
||||
# Do not use implicit culture-sensitive ToString
|
||||
dotnet_diagnostic.MA0075.severity = silent
|
||||
# Do not use implicit culture-sensitive ToString in interpolated strings
|
||||
dotnet_diagnostic.MA0076.severity = silent
|
||||
# A class that provides Equals(T) should implement IEquatable<T>
|
||||
dotnet_diagnostic.MA0077.severity = error
|
||||
# Use 'Cast' instead of 'Select' to cast
|
||||
dotnet_diagnostic.MA0078.severity = silent
|
||||
# Flow the cancellation token using .WithCancellation()
|
||||
dotnet_diagnostic.MA0079.severity = error
|
||||
# Use a cancellation token using .WithCancellation()
|
||||
dotnet_diagnostic.MA0080.severity = error
|
||||
# Method overrides should not omit params keyword
|
||||
dotnet_diagnostic.MA0081.severity = error
|
||||
# NaN should not be used in comparisons
|
||||
dotnet_diagnostic.MA0082.severity = error
|
||||
# ConstructorArgument parameters should exist in constructors
|
||||
dotnet_diagnostic.MA0083.severity = error
|
||||
# Local variable should not hide other symbols
|
||||
dotnet_diagnostic.MA0084.severity = warning
|
||||
# Anonymous delegates should not be used to unsubscribe from Events
|
||||
dotnet_diagnostic.MA0085.severity = error
|
||||
# Do not throw from a finalizer
|
||||
dotnet_diagnostic.MA0086.severity = error
|
||||
# Parameters with [DefaultParameterValue] attributes should also be marked [Optional]
|
||||
dotnet_diagnostic.MA0087.severity = error
|
||||
# Use [DefaultParameterValue] instead of [DefaultValue]
|
||||
dotnet_diagnostic.MA0088.severity = error
|
||||
# Optimize string method usage
|
||||
dotnet_diagnostic.MA0089.severity = error
|
||||
# Remove empty else/finally block
|
||||
dotnet_diagnostic.MA0090.severity = silent
|
||||
# Sender should be 'this' for instance events
|
||||
dotnet_diagnostic.MA0091.severity = silent
|
||||
# Sender should be 'null' for static events
|
||||
dotnet_diagnostic.MA0092.severity = error
|
||||
# EventArgs should not be null
|
||||
dotnet_diagnostic.MA0093.severity = error
|
||||
# A class that provides CompareTo(T) should implement IComparable<T>
|
||||
dotnet_diagnostic.MA0094.severity = error
|
||||
# A class that implements IEquatable<T> should override Equals(object)
|
||||
dotnet_diagnostic.MA0095.severity = error
|
||||
# A class that implements IComparable<T> should also implement IEquatable<T>
|
||||
dotnet_diagnostic.MA0096.severity = silent
|
||||
# A class that implements IComparable<T> or IComparable should override comparison operators
|
||||
dotnet_diagnostic.MA0097.severity = silent
|
||||
# Use indexer instead of LINQ methods
|
||||
dotnet_diagnostic.MA0098.severity = warning
|
||||
# Use Explicit enum value instead of 0
|
||||
dotnet_diagnostic.MA0099.severity = silent
|
||||
# Await task before disposing of resources
|
||||
dotnet_diagnostic.MA0100.severity = error
|
||||
# String contains an implicit end of line character
|
||||
dotnet_diagnostic.MA0101.severity = silent
|
||||
# Make member readonly
|
||||
dotnet_diagnostic.MA0102.severity = silent
|
||||
# Use SequenceEqual instead of equality operator
|
||||
dotnet_diagnostic.MA0103.severity = error
|
||||
# Do not create a type with a name from the BCL
|
||||
dotnet_diagnostic.MA0104.severity = silent
|
||||
# Use the lambda parameters instead of using a closure
|
||||
dotnet_diagnostic.MA0105.severity = error
|
||||
# Avoid closure by using an overload with the 'factoryArgument' parameter
|
||||
dotnet_diagnostic.MA0106.severity = error
|
||||
# Do not use culture-sensitive object.ToString
|
||||
dotnet_diagnostic.MA0107.severity = silent
|
||||
# Remove redundant argument value
|
||||
dotnet_diagnostic.MA0108.severity = error
|
||||
# Consider adding an overload with a Span<T> or Memory<T>
|
||||
dotnet_diagnostic.MA0109.severity = silent
|
||||
# Use the Regex source generator
|
||||
dotnet_diagnostic.MA0110.severity = error
|
||||
|
||||
## Menees.Analyzers rules
|
||||
|
||||
# Line is too long
|
||||
dotnet_diagnostic.MEN002.severity = silent
|
||||
# Method is too long
|
||||
dotnet_diagnostic.MEN003.severity = silent
|
||||
# Property accessor is too long
|
||||
dotnet_diagnostic.MEN004.severity = silent
|
||||
# File is too long
|
||||
dotnet_diagnostic.MEN005.severity = silent
|
||||
# Use a single return
|
||||
dotnet_diagnostic.MEN007.severity = silent
|
||||
# File name should match type
|
||||
dotnet_diagnostic.MEN008.severity = silent
|
||||
# Use the preferred exception type
|
||||
dotnet_diagnostic.MEN009.severity = silent
|
||||
# Avoid magic numbers
|
||||
dotnet_diagnostic.MEN010.severity = silent
|
||||
# Flags should be powers of two
|
||||
dotnet_diagnostic.MEN012.severity = silent
|
||||
# Use UTC time
|
||||
dotnet_diagnostic.MEN013.severity = silent
|
||||
# Prefer TryGetValue
|
||||
dotnet_diagnostic.MEN014.severity = warning
|
||||
# Use Preferred Terms
|
||||
dotnet_diagnostic.MEN015.severity = silent
|
||||
|
||||
## StyleCop spacing rules
|
||||
|
||||
# Keywords should be spaced correctly
|
||||
dotnet_diagnostic.SA1000.severity = silent
|
||||
# Commas should be spaced correctly
|
||||
dotnet_diagnostic.SA1001.severity = silent
|
||||
# Semicolons should be spaced correctly
|
||||
dotnet_diagnostic.SA1002.severity = silent
|
||||
# Symbols should be spaced correctly
|
||||
dotnet_diagnostic.SA1003.severity = silent
|
||||
# Documentation lines should begin with single space
|
||||
dotnet_diagnostic.SA1004.severity = silent
|
||||
# Single line comments should begin with single space
|
||||
dotnet_diagnostic.SA1005.severity = silent
|
||||
# Preprocessor keywords should not be preceded by space
|
||||
dotnet_diagnostic.SA1006.severity = error
|
||||
# Opening parenthesis should be spaced correctly
|
||||
dotnet_diagnostic.SA1008.severity = silent
|
||||
# Closing parenthesis should be spaced correctly
|
||||
dotnet_diagnostic.SA1009.severity = silent
|
||||
# Opening square brackets should be spaced correctly
|
||||
dotnet_diagnostic.SA1010.severity = silent
|
||||
# Closing square brackets should be spaced correctly
|
||||
dotnet_diagnostic.SA1011.severity = silent
|
||||
# Opening braces should be spaced correctly
|
||||
dotnet_diagnostic.SA1012.severity = silent
|
||||
# Closing braces should be spaced correctly
|
||||
dotnet_diagnostic.SA1013.severity = silent
|
||||
# Closing generic bracket should be followed by a space
|
||||
dotnet_diagnostic.SA1015.severity = silent
|
||||
# Member access symbols should be spaced correctly
|
||||
dotnet_diagnostic.SA1019.severity = error
|
||||
# Negative signs should be spaced correctly
|
||||
dotnet_diagnostic.SA1021.severity = silent
|
||||
# Dereference and access of symbols should be spaced correctly
|
||||
dotnet_diagnostic.SA1023.severity = silent
|
||||
# Colons should be spaced correctly
|
||||
dotnet_diagnostic.SA1024.severity = silent
|
||||
# Code should not contain multiple whitespace in a row
|
||||
dotnet_diagnostic.SA1025.severity = silent
|
||||
# Use tabs correctly
|
||||
dotnet_diagnostic.SA1027.severity = silent
|
||||
# Code should not contain trailing whitespace
|
||||
dotnet_diagnostic.SA1028.severity = silent
|
||||
|
||||
## StyleCop readability rules
|
||||
|
||||
# Do not prefix calls with base unless local implementation exists
|
||||
dotnet_diagnostic.SA1100.severity = error
|
||||
# Prefix local calls with this
|
||||
dotnet_diagnostic.SA1101.severity = silent
|
||||
# Code should not contain multiple statements on one line
|
||||
dotnet_diagnostic.SA1107.severity = silent
|
||||
# Block statements should not contain embedded comments
|
||||
dotnet_diagnostic.SA1108.severity = silent
|
||||
# Opening parenthesis or bracket should be on declaration line
|
||||
dotnet_diagnostic.SA1110.severity = silent
|
||||
# Closing parenthesis should be on line of last parameter
|
||||
dotnet_diagnostic.SA1111.severity = silent
|
||||
# Parameter list should follow declaration
|
||||
dotnet_diagnostic.SA1114.severity = silent
|
||||
# Split parameters should start on line after declaration
|
||||
dotnet_diagnostic.SA1116.severity = silent
|
||||
# Parameters should be on same line or separate lines
|
||||
dotnet_diagnostic.SA1117.severity = silent
|
||||
# Parameter should not span multiple lines
|
||||
dotnet_diagnostic.SA1118.severity = silent
|
||||
# Comments should contain text
|
||||
dotnet_diagnostic.SA1120.severity = warning
|
||||
# Use built-in type alias
|
||||
dotnet_diagnostic.SA1121.severity = error
|
||||
# Use string.Empty for empty strings
|
||||
dotnet_diagnostic.SA1122.severity = silent
|
||||
# Generic type constraints should be on their own line
|
||||
dotnet_diagnostic.SA1127.severity = silent
|
||||
# Put constructor initializers on their own line
|
||||
dotnet_diagnostic.SA1128.severity = silent
|
||||
# Do not use default value type constructor
|
||||
dotnet_diagnostic.SA1129.severity = error
|
||||
# Use readable conditions
|
||||
dotnet_diagnostic.SA1131.severity = silent
|
||||
# Do not combine fields
|
||||
dotnet_diagnostic.SA1132.severity = silent
|
||||
# Do not combine attributes
|
||||
dotnet_diagnostic.SA1133.severity = error
|
||||
# Attributes should not share line
|
||||
dotnet_diagnostic.SA1134.severity = silent
|
||||
# Enum values should be on separate lines
|
||||
dotnet_diagnostic.SA1136.severity = silent
|
||||
# Elements should have the same indentation
|
||||
dotnet_diagnostic.SA1137.severity = error
|
||||
|
||||
## StyleCop ordering rules
|
||||
|
||||
# Elements should appear in the correct order
|
||||
dotnet_diagnostic.SA1201.severity = silent
|
||||
# Elements should be ordered by access
|
||||
dotnet_diagnostic.SA1202.severity = silent
|
||||
# Constants should appear before fields
|
||||
dotnet_diagnostic.SA1203.severity = silent
|
||||
# Static elements should appear before instance elements
|
||||
dotnet_diagnostic.SA1204.severity = silent
|
||||
# System using directives should be placed before other using directives
|
||||
dotnet_diagnostic.SA1208.severity = error
|
||||
# Using directives should be ordered alphabetically by namespace
|
||||
dotnet_diagnostic.SA1210.severity = silent
|
||||
# Using alias directives should be ordered alphabetically by alias name
|
||||
dotnet_diagnostic.SA1211.severity = error
|
||||
# Readonly fields should appear before non-readonly fields
|
||||
dotnet_diagnostic.SA1214.severity = silent
|
||||
|
||||
## StyleCop naming rules
|
||||
|
||||
# Element should begin with upper-case letter
|
||||
dotnet_diagnostic.SA1300.severity = silent
|
||||
# Interface names should begin with I
|
||||
dotnet_diagnostic.SA1302.severity = silent
|
||||
# Const field names should begin with upper-case letter
|
||||
dotnet_diagnostic.SA1303.severity = silent
|
||||
# Non-private readonly fields should begin with upper-case letter
|
||||
dotnet_diagnostic.SA1304.severity = silent
|
||||
# Field names should begin with lower-case letter
|
||||
dotnet_diagnostic.SA1306.severity = silent
|
||||
# Accessible fields should begin with upper-case letter
|
||||
dotnet_diagnostic.SA1307.severity = silent
|
||||
# Variable names should not be prefixed
|
||||
dotnet_diagnostic.SA1308.severity = silent
|
||||
# Field names should not begin with underscore
|
||||
dotnet_diagnostic.SA1309.severity = silent
|
||||
# Field names should not contain underscore
|
||||
dotnet_diagnostic.SA1310.severity = silent
|
||||
# Static readonly fields should begin with upper-case letter
|
||||
dotnet_diagnostic.SA1311.severity = silent
|
||||
# Variable names should begin with lower-case letter
|
||||
dotnet_diagnostic.SA1312.severity = silent
|
||||
# Parameter names should begin with lower-case letter
|
||||
dotnet_diagnostic.SA1313.severity = silent
|
||||
|
||||
## StyleCop maintainability rules
|
||||
|
||||
# Statement should not use unnecessary parenthesis # I put this rule in this section because the defaults put it here.
|
||||
dotnet_diagnostic.SA1119.severity = silent
|
||||
# Access modifier should be declared
|
||||
dotnet_diagnostic.SA1400.severity = error
|
||||
# Fields should be private
|
||||
dotnet_diagnostic.SA1401.severity = silent
|
||||
# File may only contain a single type
|
||||
dotnet_diagnostic.SA1402.severity = silent
|
||||
# Debug.Assert should provide message text
|
||||
dotnet_diagnostic.SA1405.severity = silent
|
||||
# Arithmetic expressions should declare precedence
|
||||
dotnet_diagnostic.SA1407.severity = silent
|
||||
# Conditional expressions should declare precedence
|
||||
dotnet_diagnostic.SA1408.severity = silent
|
||||
# Use trailing comma in multi-line initializers
|
||||
dotnet_diagnostic.SA1413.severity = silent
|
||||
|
||||
## StyleCop layout rules
|
||||
|
||||
# Braces for multi-line statements should not share line
|
||||
dotnet_diagnostic.SA1500.severity = silent
|
||||
# Statement should not be on a single line
|
||||
dotnet_diagnostic.SA1501.severity = silent
|
||||
# Element should not be on a single line
|
||||
dotnet_diagnostic.SA1502.severity = silent
|
||||
# Braces should not be omitted
|
||||
dotnet_diagnostic.SA1503.severity = silent
|
||||
# Opening braces should not be followed by blank line
|
||||
dotnet_diagnostic.SA1505.severity = silent
|
||||
# Element documentation headers should not be followed by blank line
|
||||
dotnet_diagnostic.SA1506.severity = silent
|
||||
# Code should not contain multiple blank lines in a row
|
||||
dotnet_diagnostic.SA1507.severity = silent
|
||||
# Closing braces should not be preceded by blank line
|
||||
dotnet_diagnostic.SA1508.severity = silent
|
||||
# Opening braces should not be preceded by blank line
|
||||
dotnet_diagnostic.SA1509.severity = silent
|
||||
# Chained statement blocks should not be preceded by blank line
|
||||
dotnet_diagnostic.SA1510.severity = silent
|
||||
# Single-line comments should not be followed by blank line
|
||||
dotnet_diagnostic.SA1512.severity = silent
|
||||
# Closing brace should be followed by blank line
|
||||
dotnet_diagnostic.SA1513.severity = silent
|
||||
# Element documentation header should be preceded by blank line
|
||||
dotnet_diagnostic.SA1514.severity = silent
|
||||
# Single-line comment should be preceded by blank line
|
||||
dotnet_diagnostic.SA1515.severity = silent
|
||||
# Elements should be separated by blank line
|
||||
dotnet_diagnostic.SA1516.severity = silent
|
||||
# Code should not contain blank lines at start of file
|
||||
dotnet_diagnostic.SA1517.severity = silent
|
||||
# Use line endings correctly at end of file
|
||||
dotnet_diagnostic.SA1518.severity = silent
|
||||
# Braces should not be omitted from multi-line child statement
|
||||
dotnet_diagnostic.SA1519.severity = silent
|
||||
# Use braces consistently
|
||||
dotnet_diagnostic.SA1520.severity = silent
|
||||
|
||||
## StyleCop documentation rules
|
||||
|
||||
# Element documentation should have summary text
|
||||
dotnet_diagnostic.SA1606.severity = silent
|
||||
# Property documentation should have value text
|
||||
dotnet_diagnostic.SA1610.severity = silent
|
||||
# Element parameter documentation should match element parameters
|
||||
dotnet_diagnostic.SA1612.severity = silent
|
||||
# Element parameter documentation should have text
|
||||
dotnet_diagnostic.SA1614.severity = silent
|
||||
# Element return value documentation should have text
|
||||
dotnet_diagnostic.SA1616.severity = silent
|
||||
# Generic type parameter documentation should have text
|
||||
dotnet_diagnostic.SA1622.severity = silent
|
||||
# Property summary documentation should match accessors
|
||||
dotnet_diagnostic.SA1623.severity = silent
|
||||
# Element documentation should not be copied and pasted
|
||||
dotnet_diagnostic.SA1625.severity = silent
|
||||
# Documentation text should not be empty
|
||||
dotnet_diagnostic.SA1627.severity = silent
|
||||
# Documentation text should end with a period
|
||||
dotnet_diagnostic.SA1629.severity = silent
|
||||
# File should have header
|
||||
dotnet_diagnostic.SA1633.severity = silent
|
||||
# Constructor summary documentation should begin with standard text
|
||||
dotnet_diagnostic.SA1642.severity = silent
|
||||
# File name should match first type name
|
||||
dotnet_diagnostic.SA1649.severity = silent
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<AnalysisModePerformance>Recommended</AnalysisModePerformance>
|
||||
<AnalysisModeUsage>Recommended</AnalysisModeUsage>
|
||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||
<CodeAnalysisRuleSet>$(MSBuildProjectDirectory)/../../Common.ruleset</CodeAnalysisRuleSet>
|
||||
<ContinuousIntegrationBuild Condition=" '$(GITLAB_CI)' != '' Or '$(APPVEYOR)' != '' ">true</ContinuousIntegrationBuild>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
|
|
787
Common.ruleset
787
Common.ruleset
|
@ -1,787 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<RuleSet Name="BizHawk Rules" Description="Applies to all projects in the solution -- or, it will eventually." ToolsVersion="14.0">
|
||||
<Rules AnalyzerId="BizHawk.Analyzer" RuleNamespace="BizHawk.Analyzer">
|
||||
<!-- Do not use anonymous delegates -->
|
||||
<Rule Id="BHI1001" Action="Error" />
|
||||
|
||||
<!-- Do not use anonymous types (classes) -->
|
||||
<Rule Id="BHI1002" Action="Error" />
|
||||
|
||||
<!-- Do not use query expression syntax -->
|
||||
<Rule Id="BHI1003" Action="Error" />
|
||||
|
||||
<!-- Verbatim interpolated strings should begin $@, not @$ -->
|
||||
<Rule Id="BHI1004" Action="Error" />
|
||||
|
||||
<!-- Default branch of switch expression should throw InvalidOperationException/SwitchExpressionException or not throw -->
|
||||
<Rule Id="BHI1005" Action="Error" />
|
||||
|
||||
<!-- Do not discard local variables -->
|
||||
<Rule Id="BHI1006" Action="Error" />
|
||||
|
||||
<!-- Don't call this.GetType() in sealed type, use typeof operator -->
|
||||
<Rule Id="BHI1100" Action="Error" />
|
||||
|
||||
<!-- Don't call this.GetType(), use typeof operator (or replace subtype check with better encapsulation) -->
|
||||
<Rule Id="BHI1101" Action="Error" />
|
||||
|
||||
<!-- Don't call typeof(T).Name, use nameof operator -->
|
||||
<Rule Id="BHI1102" Action="Error" />
|
||||
|
||||
<!-- Don't call typeof(T).ToString(), use nameof operator or typeof(T).FullName -->
|
||||
<Rule Id="BHI1103" Action="Error" />
|
||||
|
||||
<!-- Check result of IDictionary.TryGetValue, or discard it if default(T) is desired -->
|
||||
<Rule Id="BHI1200" Action="Error" />
|
||||
|
||||
<!-- Call to FirstOrDefault when elements are of a value type; FirstOrNull may have been intended -->
|
||||
<Rule Id="BHI3100" Action="Error" />
|
||||
|
||||
<!-- Use .Order()/.OrderDescending() shorthand -->
|
||||
<Rule Id="BHI3101" Action="Warning" />
|
||||
|
||||
<!-- Throw NotImplementedException from methods/props marked [FeatureNotImplemented] -->
|
||||
<Rule Id="BHI3300" Action="Error" />
|
||||
</Rules>
|
||||
<Rules AnalyzerId="DocumentationAnalyzers" RuleNamespace="DocumentationAnalyzers.StyleRules">
|
||||
<!-- Place text in paragraphs -->
|
||||
<Rule Id="DOC100" Action="Hidden" />
|
||||
|
||||
<!-- Use child blocks consistently -->
|
||||
<Rule Id="DOC101" Action="Hidden" />
|
||||
|
||||
<!-- Use child blocks consistently across elements of the same kind -->
|
||||
<Rule Id="DOC102" Action="Hidden" />
|
||||
|
||||
<!-- Use Unicode characters -->
|
||||
<!-- unnecessary HTML entities also get picked up by CS1570, which seems more reliable -->
|
||||
<Rule Id="DOC103" Action="Error" />
|
||||
|
||||
<!-- Prefer '<see langword="keyword"/>' to '<c>keyword</c>' for referencing language keywords -->
|
||||
<Rule Id="DOC104" Action="Warning" />
|
||||
|
||||
<!-- Prefer '<paramref name="parameter"/>' to '<c>parameter</c>' for referencing parameters -->
|
||||
<Rule Id="DOC105" Action="Warning" />
|
||||
|
||||
<!-- Prefer '<typeparamref name="type_parameter"/>' to '<c>type_parameter</c>' for referencing type parameters -->
|
||||
<Rule Id="DOC106" Action="Warning" />
|
||||
|
||||
<!-- Prefer '<see cref="target"/>' to '<c>target</c>' for referencing code elements -->
|
||||
<Rule Id="DOC107" Action="Warning" />
|
||||
|
||||
<!-- Avoid empty paragraphs -->
|
||||
<Rule Id="DOC108" Action="Error" />
|
||||
</Rules>
|
||||
<Rules AnalyzerId="DocumentationAnalyzers" RuleNamespace="DocumentationAnalyzers.PortabilityRules">
|
||||
<!-- Use XML documentation syntax -->
|
||||
<Rule Id="DOC200" Action="Error" />
|
||||
|
||||
<!-- Item should have description -->
|
||||
<Rule Id="DOC201" Action="Error" />
|
||||
|
||||
<!-- Use section elements correctly -->
|
||||
<Rule Id="DOC202" Action="Error" />
|
||||
|
||||
<!-- Use block elements correctly -->
|
||||
<Rule Id="DOC203" Action="Error" />
|
||||
|
||||
<!-- Use inline elements correctly -->
|
||||
<!-- but this doesn't pick up <seealso/> in <summary/>, for example... -->
|
||||
<Rule Id="DOC204" Action="Error" />
|
||||
|
||||
<!-- 'langword' attribute value should be a language keyword -->
|
||||
<Rule Id="DOC207" Action="Error" />
|
||||
|
||||
<!-- 'href' attribute value should be a URI -->
|
||||
<!-- a lot of false negatives with this one too -->
|
||||
<Rule Id="DOC209" Action="Error" />
|
||||
</Rules>
|
||||
<Rules AnalyzerId="Menees.Analyzers" RuleNamespace="Menees.Analyzers">
|
||||
<!-- Line is too long -->
|
||||
<Rule Id="MEN002" Action="Hidden" />
|
||||
|
||||
<!-- Method is too long -->
|
||||
<Rule Id="MEN003" Action="Hidden" />
|
||||
|
||||
<!-- Property accessor is too long -->
|
||||
<Rule Id="MEN004" Action="Hidden" />
|
||||
|
||||
<!-- File is too long -->
|
||||
<Rule Id="MEN005" Action="Hidden" />
|
||||
|
||||
<!-- Use a single return -->
|
||||
<Rule Id="MEN007" Action="Hidden" />
|
||||
|
||||
<!-- File name should match type -->
|
||||
<Rule Id="MEN008" Action="Hidden" />
|
||||
|
||||
<!-- Use the preferred exception type -->
|
||||
<Rule Id="MEN009" Action="Hidden" />
|
||||
|
||||
<!-- Avoid magic numbers -->
|
||||
<Rule Id="MEN010" Action="Hidden" />
|
||||
|
||||
<!-- Flags should be powers of two -->
|
||||
<Rule Id="MEN012" Action="Hidden" />
|
||||
|
||||
<!-- Use UTC time -->
|
||||
<Rule Id="MEN013" Action="Hidden" />
|
||||
|
||||
<!-- Prefer TryGetValue -->
|
||||
<Rule Id="MEN014" Action="Warning" />
|
||||
|
||||
<!-- Use Preferred Terms -->
|
||||
<Rule Id="MEN015" Action="Hidden" />
|
||||
</Rules>
|
||||
<Rules AnalyzerId="Meziantou.Analyzers" RuleNamespace="Meziantou.Analyzers">
|
||||
<!-- StringComparison is missing -->
|
||||
<Rule Id="MA0001" Action="Hidden" />
|
||||
|
||||
<!-- IEqualityComparer<string> or IComparer<string> is missing -->
|
||||
<Rule Id="MA0002" Action="Hidden" />
|
||||
|
||||
<!-- Add parameter name to improve readability -->
|
||||
<Rule Id="MA0003" Action="Hidden" />
|
||||
|
||||
<!-- Use Task.ConfigureAwait(false) -->
|
||||
<Rule Id="MA0004" Action="Hidden" />
|
||||
|
||||
<!-- Use Array.Empty<T>() -->
|
||||
<Rule Id="MA0005" Action="Hidden" />
|
||||
|
||||
<!-- Use String.Equals instead of equality operator -->
|
||||
<Rule Id="MA0006" Action="Hidden" />
|
||||
|
||||
<!-- Add a comma after the last value -->
|
||||
<Rule Id="MA0007" Action="Hidden" />
|
||||
|
||||
<!-- Add StructLayoutAttribute -->
|
||||
<Rule Id="MA0008" Action="Hidden" />
|
||||
|
||||
<!-- Add regex evaluation timeout -->
|
||||
<Rule Id="MA0009" Action="Hidden" />
|
||||
|
||||
<!-- Mark attributes with AttributeUsageAttribute -->
|
||||
<Rule Id="MA0010" Action="Error" />
|
||||
|
||||
<!-- IFormatProvider is missing -->
|
||||
<Rule Id="MA0011" Action="Hidden" />
|
||||
|
||||
<!-- Do not raise reserved exception type -->
|
||||
<Rule Id="MA0012" Action="Error" />
|
||||
|
||||
<!-- Types should not extend System.ApplicationException -->
|
||||
<Rule Id="MA0013" Action="Error" />
|
||||
|
||||
<!-- Do not raise System.ApplicationException type -->
|
||||
<Rule Id="MA0014" Action="Error" />
|
||||
|
||||
<!-- Specify the parameter name in ArgumentException -->
|
||||
<Rule Id="MA0015" Action="Error" />
|
||||
|
||||
<!-- Prefer returning collection abstraction instead of implementation -->
|
||||
<Rule Id="MA0016" Action="Hidden" />
|
||||
|
||||
<!-- Abstract types should not have public or internal constructors -->
|
||||
<Rule Id="MA0017" Action="Hidden" />
|
||||
|
||||
<!-- Do not declare static members on generic types -->
|
||||
<Rule Id="MA0018" Action="Error" />
|
||||
|
||||
<!-- Use EventArgs.Empty -->
|
||||
<Rule Id="MA0019" Action="Error" />
|
||||
|
||||
<!-- Use direct methods instead of LINQ methods -->
|
||||
<Rule Id="MA0020" Action="Error" />
|
||||
|
||||
<!-- Use StringComparer.GetHashCode instead of string.GetHashCode -->
|
||||
<Rule Id="MA0021" Action="Hidden" />
|
||||
|
||||
<!-- Return Task.FromResult instead of returning null -->
|
||||
<Rule Id="MA0022" Action="Error" />
|
||||
|
||||
<!-- Add RegexOptions.ExplicitCapture -->
|
||||
<Rule Id="MA0023" Action="Hidden" />
|
||||
|
||||
<!-- Use an explicit StringComparer when possible -->
|
||||
<Rule Id="MA0024" Action="Error" />
|
||||
|
||||
<!-- Implement the functionality instead of throwing NotImplementedException -->
|
||||
<Rule Id="MA0025" Action="Hidden" />
|
||||
|
||||
<!-- Fix TODO comment -->
|
||||
<Rule Id="MA0026" Action="Hidden" />
|
||||
|
||||
<!-- Do not remove original exception -->
|
||||
<Rule Id="MA0027" Action="Error" />
|
||||
|
||||
<!-- Optimize StringBuilder usage -->
|
||||
<Rule Id="MA0028" Action="Hidden" />
|
||||
|
||||
<!-- Combine LINQ methods -->
|
||||
<Rule Id="MA0029" Action="Error" />
|
||||
|
||||
<!-- Remove useless OrderBy call -->
|
||||
<Rule Id="MA0030" Action="Error" />
|
||||
|
||||
<!-- Optimize Enumerable.Count() usage -->
|
||||
<Rule Id="MA0031" Action="Error" />
|
||||
|
||||
<!-- Use an overload with a CancellationToken argument -->
|
||||
<Rule Id="MA0032" Action="Hidden" />
|
||||
|
||||
<!-- Do not tag instance fields with ThreadStaticAttribute -->
|
||||
<Rule Id="MA0033" Action="Error" />
|
||||
|
||||
<!-- Do not use dangerous threading methods -->
|
||||
<Rule Id="MA0035" Action="Error" />
|
||||
|
||||
<!-- Make class static -->
|
||||
<Rule Id="MA0036" Action="Hidden" />
|
||||
|
||||
<!-- Remove empty statement -->
|
||||
<Rule Id="MA0037" Action="Error" />
|
||||
|
||||
<!-- Make method static -->
|
||||
<Rule Id="MA0038" Action="Hidden" />
|
||||
|
||||
<!-- Do not write your own certificate validation method -->
|
||||
<Rule Id="MA0039" Action="Error" />
|
||||
|
||||
<!-- Flow the cancellation token -->
|
||||
<Rule Id="MA0040" Action="Hidden" />
|
||||
|
||||
<!-- Make property static -->
|
||||
<Rule Id="MA0041" Action="Hidden" />
|
||||
|
||||
<!-- Do not use blocking calls in an async method -->
|
||||
<Rule Id="MA0042" Action="Error" />
|
||||
|
||||
<!-- Use nameof operator in ArgumentException -->
|
||||
<Rule Id="MA0043" Action="Error" />
|
||||
|
||||
<!-- Remove useless ToString call -->
|
||||
<Rule Id="MA0044" Action="Hidden" />
|
||||
|
||||
<!-- Do not use blocking call in a sync method (need to make containing method async) -->
|
||||
<Rule Id="MA0045" Action="Hidden" />
|
||||
|
||||
<!-- Use EventHandler<T> to declare events -->
|
||||
<Rule Id="MA0046" Action="Hidden" />
|
||||
|
||||
<!-- Declare types in namespaces -->
|
||||
<Rule Id="MA0047" Action="Error" />
|
||||
|
||||
<!-- File name must match type name -->
|
||||
<Rule Id="MA0048" Action="Hidden" />
|
||||
|
||||
<!-- Type name should not match containing namespace -->
|
||||
<Rule Id="MA0049" Action="Hidden" />
|
||||
|
||||
<!-- Validate arguments correctly in iterator methods -->
|
||||
<Rule Id="MA0050" Action="Error" />
|
||||
|
||||
<!-- Method is too long -->
|
||||
<Rule Id="MA0051" Action="Hidden" />
|
||||
|
||||
<!-- Replace constant Enum.ToString with nameof -->
|
||||
<Rule Id="MA0052" Action="Error" />
|
||||
|
||||
<!-- Make class sealed -->
|
||||
<Rule Id="MA0053" Action="Hidden" />
|
||||
|
||||
<!-- Embed the caught exception as innerException -->
|
||||
<Rule Id="MA0054" Action="Error" />
|
||||
|
||||
<!-- Do not use finalizer -->
|
||||
<Rule Id="MA0055" Action="Hidden" />
|
||||
|
||||
<!-- Do not call overridable members in constructor -->
|
||||
<Rule Id="MA0056" Action="Hidden" />
|
||||
|
||||
<!-- Class name should end with 'Attribute' -->
|
||||
<Rule Id="MA0057" Action="Hidden" />
|
||||
|
||||
<!-- Class name should end with 'Exception' -->
|
||||
<Rule Id="MA0058" Action="Error" />
|
||||
|
||||
<!-- Class name should end with 'EventArgs' -->
|
||||
<Rule Id="MA0059" Action="Hidden" />
|
||||
|
||||
<!-- The value returned by Stream.Read/Stream.ReadAsync is not used -->
|
||||
<Rule Id="MA0060" Action="Hidden" />
|
||||
|
||||
<!-- Method overrides should not change parameter defaults -->
|
||||
<Rule Id="MA0061" Action="Hidden" />
|
||||
|
||||
<!-- Non-flags enums should not be marked with "FlagsAttribute" -->
|
||||
<Rule Id="MA0062" Action="Hidden" />
|
||||
|
||||
<!-- Use Where before OrderBy -->
|
||||
<Rule Id="MA0063" Action="Error" />
|
||||
|
||||
<!-- Avoid locking on publicly accessible instance -->
|
||||
<Rule Id="MA0064" Action="Hidden" />
|
||||
|
||||
<!-- Default ValueType.Equals or HashCode is used for struct's equality -->
|
||||
<Rule Id="MA0065" Action="Error" />
|
||||
|
||||
<!-- Hash table unfriendly type is used in a hash table -->
|
||||
<Rule Id="MA0066" Action="Error" />
|
||||
|
||||
<!-- Use Guid.Empty -->
|
||||
<Rule Id="MA0067" Action="Error" />
|
||||
|
||||
<!-- Invalid parameter name for nullable attribute -->
|
||||
<Rule Id="MA0068" Action="Error" />
|
||||
|
||||
<!-- Non-constant static fields should not be visible -->
|
||||
<Rule Id="MA0069" Action="Hidden" />
|
||||
|
||||
<!-- Obsolete attributes should include explanations -->
|
||||
<Rule Id="MA0070" Action="Hidden" />
|
||||
|
||||
<!-- Avoid using redundant else -->
|
||||
<Rule Id="MA0071" Action="Hidden" />
|
||||
|
||||
<!-- Do not throw from a finally block -->
|
||||
<Rule Id="MA0072" Action="Error" />
|
||||
|
||||
<!-- Avoid comparison with bool constant -->
|
||||
<Rule Id="MA0073" Action="Hidden" />
|
||||
|
||||
<!-- Avoid implicit culture-sensitive methods -->
|
||||
<Rule Id="MA0074" Action="Hidden" />
|
||||
|
||||
<!-- Do not use implicit culture-sensitive ToString -->
|
||||
<Rule Id="MA0075" Action="Hidden" />
|
||||
|
||||
<!-- Do not use implicit culture-sensitive ToString in interpolated strings -->
|
||||
<Rule Id="MA0076" Action="Hidden" />
|
||||
|
||||
<!-- A class that provides Equals(T) should implement IEquatable<T> -->
|
||||
<Rule Id="MA0077" Action="Error" />
|
||||
|
||||
<!-- Use 'Cast' instead of 'Select' to cast -->
|
||||
<Rule Id="MA0078" Action="Hidden" />
|
||||
|
||||
<!-- Flow the cancellation token using .WithCancellation() -->
|
||||
<Rule Id="MA0079" Action="Error" />
|
||||
|
||||
<!-- Use a cancellation token using .WithCancellation() -->
|
||||
<Rule Id="MA0080" Action="Error" />
|
||||
|
||||
<!-- Method overrides should not omit params keyword -->
|
||||
<Rule Id="MA0081" Action="Error" />
|
||||
|
||||
<!-- NaN should not be used in comparisons -->
|
||||
<Rule Id="MA0082" Action="Error" />
|
||||
|
||||
<!-- ConstructorArgument parameters should exist in constructors -->
|
||||
<Rule Id="MA0083" Action="Error" />
|
||||
|
||||
<!-- Local variable should not hide other symbols -->
|
||||
<Rule Id="MA0084" Action="Warning" />
|
||||
|
||||
<!-- Anonymous delegates should not be used to unsubscribe from Events -->
|
||||
<Rule Id="MA0085" Action="Error" />
|
||||
|
||||
<!-- Do not throw from a finalizer -->
|
||||
<Rule Id="MA0086" Action="Error" />
|
||||
|
||||
<!-- Parameters with [DefaultParameterValue] attributes should also be marked [Optional] -->
|
||||
<Rule Id="MA0087" Action="Error" />
|
||||
|
||||
<!-- Use [DefaultParameterValue] instead of [DefaultValue] -->
|
||||
<Rule Id="MA0088" Action="Error" />
|
||||
|
||||
<!-- Optimize string method usage -->
|
||||
<Rule Id="MA0089" Action="Error" />
|
||||
|
||||
<!-- Remove empty else/finally block -->
|
||||
<Rule Id="MA0090" Action="Hidden" />
|
||||
|
||||
<!-- Sender should be 'this' for instance events -->
|
||||
<Rule Id="MA0091" Action="Hidden" />
|
||||
|
||||
<!-- Sender should be 'null' for static events -->
|
||||
<Rule Id="MA0092" Action="Error" />
|
||||
|
||||
<!-- EventArgs should not be null -->
|
||||
<Rule Id="MA0093" Action="Error" />
|
||||
|
||||
<!-- A class that provides CompareTo(T) should implement IComparable<T> -->
|
||||
<Rule Id="MA0094" Action="Error" />
|
||||
|
||||
<!-- A class that implements IEquatable<T> should override Equals(object) -->
|
||||
<Rule Id="MA0095" Action="Error" />
|
||||
|
||||
<!-- A class that implements IComparable<T> should also implement IEquatable<T> -->
|
||||
<Rule Id="MA0096" Action="Hidden" />
|
||||
|
||||
<!-- A class that implements IComparable<T> or IComparable should override comparison operators -->
|
||||
<Rule Id="MA0097" Action="Hidden" />
|
||||
|
||||
<!-- Use indexer instead of LINQ methods -->
|
||||
<Rule Id="MA0098" Action="Warning" />
|
||||
|
||||
<!-- Use Explicit enum value instead of 0 -->
|
||||
<Rule Id="MA0099" Action="Hidden" />
|
||||
|
||||
<!-- Await task before disposing of resources -->
|
||||
<Rule Id="MA0100" Action="Error" />
|
||||
|
||||
<!-- String contains an implicit end of line character -->
|
||||
<Rule Id="MA0101" Action="Hidden" />
|
||||
|
||||
<!-- Make member readonly -->
|
||||
<Rule Id="MA0102" Action="Hidden" />
|
||||
|
||||
<!-- Use SequenceEqual instead of equality operator -->
|
||||
<Rule Id="MA0103" Action="Error" />
|
||||
|
||||
<!-- Do not create a type with a name from the BCL -->
|
||||
<Rule Id="MA0104" Action="Hidden" />
|
||||
|
||||
<!-- Use the lambda parameters instead of using a closure -->
|
||||
<Rule Id="MA0105" Action="Error" />
|
||||
|
||||
<!-- Avoid closure by using an overload with the 'factoryArgument' parameter -->
|
||||
<Rule Id="MA0106" Action="Error" />
|
||||
|
||||
<!-- Do not use culture-sensitive object.ToString -->
|
||||
<Rule Id="MA0107" Action="Hidden" />
|
||||
|
||||
<!-- Remove redundant argument value -->
|
||||
<Rule Id="MA0108" Action="Error" />
|
||||
|
||||
<!-- Consider adding an overload with a Span<T> or Memory<T> -->
|
||||
<Rule Id="MA0109" Action="Hidden" />
|
||||
|
||||
<!-- Use the Regex source generator -->
|
||||
<Rule Id="MA0110" Action="Error" />
|
||||
</Rules>
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.SpacingRules">
|
||||
<!-- Keywords should be spaced correctly -->
|
||||
<Rule Id="SA1000" Action="Hidden" />
|
||||
|
||||
<!-- Commas should be spaced correctly -->
|
||||
<Rule Id="SA1001" Action="Hidden" />
|
||||
|
||||
<!-- Semicolons should be spaced correctly -->
|
||||
<Rule Id="SA1002" Action="Hidden" />
|
||||
|
||||
<!-- Symbols should be spaced correctly -->
|
||||
<Rule Id="SA1003" Action="Hidden" />
|
||||
|
||||
<!-- Documentation lines should begin with single space -->
|
||||
<Rule Id="SA1004" Action="Hidden" />
|
||||
|
||||
<!-- Single line comments should begin with single space -->
|
||||
<Rule Id="SA1005" Action="Hidden" />
|
||||
|
||||
<!-- Preprocessor keywords should not be preceded by space -->
|
||||
<Rule Id="SA1006" Action="Error" />
|
||||
|
||||
<!-- Opening parenthesis should be spaced correctly -->
|
||||
<Rule Id="SA1008" Action="Hidden" />
|
||||
|
||||
<!-- Closing parenthesis should be spaced correctly -->
|
||||
<Rule Id="SA1009" Action="Hidden" />
|
||||
|
||||
<!-- Opening square brackets should be spaced correctly -->
|
||||
<Rule Id="SA1010" Action="Hidden" />
|
||||
|
||||
<!-- Closing square brackets should be spaced correctly -->
|
||||
<Rule Id="SA1011" Action="Hidden" />
|
||||
|
||||
<!-- Opening braces should be spaced correctly -->
|
||||
<Rule Id="SA1012" Action="Hidden" />
|
||||
|
||||
<!-- Closing braces should be spaced correctly -->
|
||||
<Rule Id="SA1013" Action="Hidden" />
|
||||
|
||||
<!-- Closing generic bracket should be followed by a space -->
|
||||
<Rule Id="SA1015" Action="Hidden" />
|
||||
|
||||
<!-- Member access symbols should be spaced correctly -->
|
||||
<Rule Id="SA1019" Action="Error" />
|
||||
|
||||
<!-- Negative signs should be spaced correctly -->
|
||||
<Rule Id="SA1021" Action="Hidden" />
|
||||
|
||||
<!-- Dereference and access of symbols should be spaced correctly -->
|
||||
<Rule Id="SA1023" Action="Hidden" />
|
||||
|
||||
<!-- Colons should be spaced correctly -->
|
||||
<Rule Id="SA1024" Action="Hidden" />
|
||||
|
||||
<!-- Code should not contain multiple whitespace in a row -->
|
||||
<Rule Id="SA1025" Action="Hidden" />
|
||||
|
||||
<!-- Use tabs correctly -->
|
||||
<Rule Id="SA1027" Action="Hidden" />
|
||||
|
||||
<!-- Code should not contain trailing whitespace -->
|
||||
<Rule Id="SA1028" Action="Hidden" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.ReadabilityRules">
|
||||
<!-- Do not prefix calls with base unless local implementation exists -->
|
||||
<Rule Id="SA1100" Action="Error" />
|
||||
|
||||
<!-- Prefix local calls with this -->
|
||||
<Rule Id="SA1101" Action="Hidden" />
|
||||
|
||||
<!-- Code should not contain multiple statements on one line -->
|
||||
<Rule Id="SA1107" Action="Hidden" />
|
||||
|
||||
<!-- Block statements should not contain embedded comments -->
|
||||
<Rule Id="SA1108" Action="Hidden" />
|
||||
|
||||
<!-- Opening parenthesis or bracket should be on declaration line -->
|
||||
<Rule Id="SA1110" Action="Hidden" />
|
||||
|
||||
<!-- Closing parenthesis should be on line of last parameter -->
|
||||
<Rule Id="SA1111" Action="Hidden" />
|
||||
|
||||
<!-- Parameter list should follow declaration -->
|
||||
<Rule Id="SA1114" Action="Hidden" />
|
||||
|
||||
<!-- Split parameters should start on line after declaration -->
|
||||
<Rule Id="SA1116" Action="Hidden" />
|
||||
|
||||
<!-- Parameters should be on same line or separate lines -->
|
||||
<Rule Id="SA1117" Action="Hidden" />
|
||||
|
||||
<!-- Parameter should not span multiple lines -->
|
||||
<Rule Id="SA1118" Action="Hidden" />
|
||||
|
||||
<!-- Comments should contain text -->
|
||||
<Rule Id="SA1120" Action="Warning" />
|
||||
|
||||
<!-- Use built-in type alias -->
|
||||
<Rule Id="SA1121" Action="Error" />
|
||||
|
||||
<!-- Use string.Empty for empty strings -->
|
||||
<Rule Id="SA1122" Action="Hidden" />
|
||||
|
||||
<!-- Generic type constraints should be on their own line -->
|
||||
<Rule Id="SA1127" Action="Hidden" />
|
||||
|
||||
<!-- Put constructor initializers on their own line -->
|
||||
<Rule Id="SA1128" Action="Hidden" />
|
||||
|
||||
<!-- Do not use default value type constructor -->
|
||||
<Rule Id="SA1129" Action="Error" />
|
||||
|
||||
<!-- Use readable conditions -->
|
||||
<Rule Id="SA1131" Action="Hidden" />
|
||||
|
||||
<!-- Do not combine fields -->
|
||||
<Rule Id="SA1132" Action="Hidden" />
|
||||
|
||||
<!-- Do not combine attributes -->
|
||||
<Rule Id="SA1133" Action="Error" />
|
||||
|
||||
<!-- Attributes should not share line -->
|
||||
<Rule Id="SA1134" Action="Hidden" />
|
||||
|
||||
<!-- Enum values should be on separate lines -->
|
||||
<Rule Id="SA1136" Action="Hidden" />
|
||||
|
||||
<!-- Elements should have the same indentation -->
|
||||
<Rule Id="SA1137" Action="Error" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.OrderingRules">
|
||||
<!-- Elements should appear in the correct order -->
|
||||
<Rule Id="SA1201" Action="Hidden" />
|
||||
|
||||
<!-- Elements should be ordered by access -->
|
||||
<Rule Id="SA1202" Action="Hidden" />
|
||||
|
||||
<!-- Constants should appear before fields -->
|
||||
<Rule Id="SA1203" Action="Hidden" />
|
||||
|
||||
<!-- Static elements should appear before instance elements -->
|
||||
<Rule Id="SA1204" Action="Hidden" />
|
||||
|
||||
<!-- System using directives should be placed before other using directives -->
|
||||
<Rule Id="SA1208" Action="Error" />
|
||||
|
||||
<!-- Using directives should be ordered alphabetically by namespace -->
|
||||
<Rule Id="SA1210" Action="Hidden" />
|
||||
|
||||
<!-- Using alias directives should be ordered alphabetically by alias name -->
|
||||
<Rule Id="SA1211" Action="Error" />
|
||||
|
||||
<!-- Readonly fields should appear before non-readonly fields -->
|
||||
<Rule Id="SA1214" Action="Hidden" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.NamingRules">
|
||||
<!-- Element should begin with upper-case letter -->
|
||||
<Rule Id="SA1300" Action="Hidden" />
|
||||
|
||||
<!-- Interface names should begin with I -->
|
||||
<Rule Id="SA1302" Action="Hidden" />
|
||||
|
||||
<!-- Const field names should begin with upper-case letter -->
|
||||
<Rule Id="SA1303" Action="Hidden" />
|
||||
|
||||
<!-- Non-private readonly fields should begin with upper-case letter -->
|
||||
<Rule Id="SA1304" Action="Hidden" />
|
||||
|
||||
<!-- Field names should begin with lower-case letter -->
|
||||
<Rule Id="SA1306" Action="Hidden" />
|
||||
|
||||
<!-- Accessible fields should begin with upper-case letter -->
|
||||
<Rule Id="SA1307" Action="Hidden" />
|
||||
|
||||
<!-- Variable names should not be prefixed -->
|
||||
<Rule Id="SA1308" Action="Hidden" />
|
||||
|
||||
<!-- Field names should not begin with underscore -->
|
||||
<Rule Id="SA1309" Action="Hidden" />
|
||||
|
||||
<!-- Field names should not contain underscore -->
|
||||
<Rule Id="SA1310" Action="Hidden" />
|
||||
|
||||
<!-- Static readonly fields should begin with upper-case letter -->
|
||||
<Rule Id="SA1311" Action="Hidden" />
|
||||
|
||||
<!-- Variable names should begin with lower-case letter -->
|
||||
<Rule Id="SA1312" Action="Hidden" />
|
||||
|
||||
<!-- Parameter names should begin with lower-case letter -->
|
||||
<Rule Id="SA1313" Action="Hidden" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.MaintainabilityRules">
|
||||
<!-- I put this rule in this section because the defaults put it here. -->
|
||||
<!-- Statement should not use unnecessary parenthesis -->
|
||||
<Rule Id="SA1119" Action="Hidden" />
|
||||
|
||||
<!-- Access modifier should be declared -->
|
||||
<Rule Id="SA1400" Action="Error" />
|
||||
|
||||
<!-- Fields should be private -->
|
||||
<Rule Id="SA1401" Action="Hidden" />
|
||||
|
||||
<!-- File may only contain a single type -->
|
||||
<Rule Id="SA1402" Action="Hidden" />
|
||||
|
||||
<!-- Debug.Assert should provide message text -->
|
||||
<Rule Id="SA1405" Action="Hidden" />
|
||||
|
||||
<!-- Arithmetic expressions should declare precedence -->
|
||||
<Rule Id="SA1407" Action="Hidden" />
|
||||
|
||||
<!-- Conditional expressions should declare precedence -->
|
||||
<Rule Id="SA1408" Action="Hidden" />
|
||||
|
||||
<!-- Use trailing comma in multi-line initializers -->
|
||||
<Rule Id="SA1413" Action="Hidden" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.LayoutRules">
|
||||
<!-- Braces for multi-line statements should not share line -->
|
||||
<Rule Id="SA1500" Action="Hidden" />
|
||||
|
||||
<!-- Statement should not be on a single line -->
|
||||
<Rule Id="SA1501" Action="Hidden" />
|
||||
|
||||
<!-- Element should not be on a single line -->
|
||||
<Rule Id="SA1502" Action="Hidden" />
|
||||
|
||||
<!-- Braces should not be omitted -->
|
||||
<Rule Id="SA1503" Action="Hidden" />
|
||||
|
||||
<!-- Opening braces should not be followed by blank line -->
|
||||
<Rule Id="SA1505" Action="Hidden" />
|
||||
|
||||
<!-- Element documentation headers should not be followed by blank line -->
|
||||
<Rule Id="SA1506" Action="Hidden" />
|
||||
|
||||
<!-- Code should not contain multiple blank lines in a row -->
|
||||
<Rule Id="SA1507" Action="Hidden" />
|
||||
|
||||
<!-- Closing braces should not be preceded by blank line -->
|
||||
<Rule Id="SA1508" Action="Hidden" />
|
||||
|
||||
<!-- Opening braces should not be preceded by blank line -->
|
||||
<Rule Id="SA1509" Action="Hidden" />
|
||||
|
||||
<!-- Chained statement blocks should not be preceded by blank line -->
|
||||
<Rule Id="SA1510" Action="Hidden" />
|
||||
|
||||
<!-- Single-line comments should not be followed by blank line -->
|
||||
<Rule Id="SA1512" Action="Hidden" />
|
||||
|
||||
<!-- Closing brace should be followed by blank line -->
|
||||
<Rule Id="SA1513" Action="Hidden" />
|
||||
|
||||
<!-- Element documentation header should be preceded by blank line -->
|
||||
<Rule Id="SA1514" Action="Hidden" />
|
||||
|
||||
<!-- Single-line comment should be preceded by blank line -->
|
||||
<Rule Id="SA1515" Action="Hidden" />
|
||||
|
||||
<!-- Elements should be separated by blank line -->
|
||||
<Rule Id="SA1516" Action="Hidden" />
|
||||
|
||||
<!-- Code should not contain blank lines at start of file -->
|
||||
<Rule Id="SA1517" Action="Hidden" />
|
||||
|
||||
<!-- Use line endings correctly at end of file -->
|
||||
<Rule Id="SA1518" Action="Hidden" />
|
||||
|
||||
<!-- Braces should not be omitted from multi-line child statement -->
|
||||
<Rule Id="SA1519" Action="Hidden" />
|
||||
|
||||
<!-- Use braces consistently -->
|
||||
<Rule Id="SA1520" Action="Hidden" />
|
||||
</Rules>
|
||||
|
||||
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.DocumentationRules">
|
||||
<!-- Element documentation should have summary text -->
|
||||
<Rule Id="SA1606" Action="Hidden" />
|
||||
|
||||
<!-- Property documentation should have value text -->
|
||||
<Rule Id="SA1610" Action="Hidden" />
|
||||
|
||||
<!-- Element parameter documentation should match element parameters -->
|
||||
<Rule Id="SA1612" Action="Hidden" />
|
||||
|
||||
<!-- Element parameter documentation should have text -->
|
||||
<Rule Id="SA1614" Action="Hidden" />
|
||||
|
||||
<!-- Element return value documentation should have text -->
|
||||
<Rule Id="SA1616" Action="Hidden" />
|
||||
|
||||
<!-- Generic type parameter documentation should have text -->
|
||||
<Rule Id="SA1622" Action="Hidden" />
|
||||
|
||||
<!-- Property summary documentation should match accessors -->
|
||||
<Rule Id="SA1623" Action="Hidden" />
|
||||
|
||||
<!-- Element documentation should not be copied and pasted -->
|
||||
<Rule Id="SA1625" Action="Hidden" />
|
||||
|
||||
<!-- Documentation text should not be empty -->
|
||||
<Rule Id="SA1627" Action="Hidden" />
|
||||
|
||||
<!-- Documentation text should end with a period -->
|
||||
<Rule Id="SA1629" Action="Hidden" />
|
||||
|
||||
<!-- File should have header -->
|
||||
<Rule Id="SA1633" Action="Hidden" />
|
||||
|
||||
<!-- Constructor summary documentation should begin with standard text -->
|
||||
<Rule Id="SA1642" Action="Hidden" />
|
||||
|
||||
<!-- File name should match first type name -->
|
||||
<Rule Id="SA1649" Action="Hidden" />
|
||||
</Rules>
|
||||
</RuleSet>
|
Loading…
Reference in New Issue