Skip to content

Instantly share code, notes, and snippets.

@EngRajabi
Last active January 28, 2024 09:16
Show Gist options
  • Save EngRajabi/63779b0d02eea78ce220ff7a49e5a068 to your computer and use it in GitHub Desktop.
Save EngRajabi/63779b0d02eea78ce220ff7a49e5a068 to your computer and use it in GitHub Desktop.
; Top-most http://editorconfig.org/ file
root = true
[*]
insert_final_newline = true
indent_style = space
charset = utf-8
trim_trailing_whitespace = true
[*.cs]
indent_size = 4
[*.{xml,config,*proj,nuspec,props,resx,targets,yml,tasks}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
[*.json]
indent_size = 2
[*.{ps1,psm1}]
indent_size = 4
[*.sh]
indent_size = 4
[*.{cs,vb}]
# Roslynator Configuration
#dotnet_analyzer_diagnostic.category-roslynator.severity = error
#roslynator_analyzers.enabled_by_default = true
#roslynator_refactorings.enabled = true
#roslynator_compiler_diagnostic_fixes.enabled = true
# CA1865-CA1867: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
dotnet_diagnostic.CA1865.severity = error
dotnet_diagnostic.CA1866.severity = error
dotnet_diagnostic.CA1867.severity = error
# CA1008: Enums should have zero value
dotnet_diagnostic.CA1008.severity = error
# CA1869: Cache and reuse 'JsonSerializerOptions' instances
dotnet_diagnostic.CA1869.severity = error
# For variables
dotnet_naming_symbols.local_symbol.applicable_kinds = parameter, local
dotnet_naming_style.local_style.capitalization = camel_case
dotnet_naming_rule.variables_are_camel_case.severity = error
dotnet_naming_rule.variables_are_camel_case.symbols = local_symbol
dotnet_naming_rule.variables_are_camel_case.style = local_style
# Sort using and Import directives with System.* appearing first
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
dotnet_style_require_accessibility_modifiers = always:error
dotnet_style_readonly_field = true:error
# CA1851: Possible multiple enumerations of IEnumerable collection
dotnet_diagnostic.CA1851.severity = error
# IDE0057: Use range operator
dotnet_diagnostic.IDE0057.severity = error
# IDE0071: Simplify interpolation
dotnet_diagnostic.IDE0071.severity = error
# IDE0075: Simplify conditional expression
dotnet_diagnostic.IDE0075.severity = error
# IDE0250: Struct can be made 'readonly' (IDE0250)
dotnet_diagnostic.IDE0250.severity = error
# IDE0002: Simplify member access
dotnet_diagnostic.IDE0002.severity = error
# IDE0003: this and Me preferences
dotnet_diagnostic.IDE0003.severity = error
# IDE0007: 'var' preferences
dotnet_diagnostic.IDE0007.severity = error
# IDE0001: Simplify name
dotnet_diagnostic.IDE0001.severity = error
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = error
# IDE0004: Remove unnecessary cast
dotnet_diagnostic.IDE0004.severity = error
# IDE0110: Remove unnecessary discard
dotnet_diagnostic.IDE0110.severity = error
# IDE0080: Remove unnecessary suppression operator
dotnet_diagnostic.IDE0080.severity = error
# IDE0082: Convert typeof to nameof
dotnet_diagnostic.IDE0082.severity = error
# IDE0100: Remove unnecessary equality operator
dotnet_diagnostic.IDE0100.severity = error
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = error
# IDE0056: Use index operator
dotnet_diagnostic.IDE0056.severity = error
# IDE0018: Inline variable declaration
dotnet_diagnostic.IDE0018.severity = error
# IDE0090: Simplify new expression
dotnet_diagnostic.IDE0090.severity = error
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = error
# IDE0034: Simplify 'default' expression
dotnet_diagnostic.IDE0034.severity = error
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = error
# CA1842: Do not use 'WhenAll' with a single task
dotnet_diagnostic.CA1842.severity = error
# CA1843: Do not use 'WaitAll' with a single task
dotnet_diagnostic.CA1843.severity = error
# CA2200: Rethrow to preserve stack details
dotnet_diagnostic.CA2200.severity = error
# IDE0005: Remove unnecessary usings
dotnet_diagnostic.IDE0005.severity = error
# IDE0055: All formatting rules
dotnet_diagnostic.IDE0055.severity = error
# IDE0051: Remove unused private members
dotnet_diagnostic.IDE0051.severity = error
# IDE0060: Remove unused parameter
dotnet_code_quality_unused_parameters = all
dotnet_diagnostic.IDE0060.severity = error
# CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
dotnet_diagnostic.CA1847.severity = error
# CA1853: CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'
dotnet_diagnostic.CA1853.severity = error
# CA1850: Prefer static HashData method over ComputeHash
dotnet_diagnostic.CA1850.severity = error
# CA1849: Call async methods when in an async method
dotnet_diagnostic.CA1849.severity = error
# CA1813: Avoid unsealed attributes
dotnet_diagnostic.CA1813.severity = error
# CA1806: Do not ignore method results
dotnet_diagnostic.CA1806.severity = error
# CA1852: Seal internal types
dotnet_diagnostic.CA1852.severity = error
# CA1854: Prefer the IDictionary.TryGetValue(TKey, out TValue) method
dotnet_diagnostic.CA1854.severity = error
# IDE0017: Use object initializers
dotnet_diagnostic.IDE0017.severity = error
# IDE0019: Use pattern matching to avoid 'as' followed by a 'null' check
dotnet_diagnostic.IDE0019.severity = error
# IDE0028: Use collection initializers
dotnet_diagnostic.IDE0028.severity = error
# IDE0270: Null check can be simplified
dotnet_diagnostic.IDE0270.severity = error
# IDE0029: Use coalesce expression (non-nullable types)
dotnet_diagnostic.IDE0029.severity = error
# IDE0030: Use coalesce expression (nullable types)
dotnet_diagnostic.IDE0030.severity = error
# IDE0031: Use null propagation
dotnet_diagnostic.IDE0031.severity = error
# IDE0033: Use explicitly provided tuple name
dotnet_diagnostic.IDE0033.severity = error
# IDE0072: Add missing cases to switch expression
dotnet_diagnostic.IDE0072.severity = error
# IDE0180: Use tuple to swap values
dotnet_diagnostic.IDE0180.severity = error
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = false:error
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:error
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:error
dotnet_style_parentheses_in_other_operators = always_for_clarity:error
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:error
# var preferences
csharp_style_var_elsewhere = true:error
csharp_style_var_for_built_in_types = true:error
csharp_style_var_when_type_is_apparent = true:error
# Newline settings
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Brace settings
csharp_prefer_braces = true # Prefer curly braces even for one line of code
# CA1018: Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = error
# CA1047: Do not declare protected member in sealed type
dotnet_diagnostic.CA1047.severity = error
# CA1507: Use nameof to express symbol names
dotnet_diagnostic.CA1507.severity = error
# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = error
# CA1511: Use ArgumentException throw helper
dotnet_diagnostic.CA1511.severity = error
# CA1826: Do not use Enumerable methods on indexable collections. Instead use the collection directly
dotnet_diagnostic.CA1826.severity = error
# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = error
# CA1513: Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1513.severity = error
# CA1725: Parameter names should match base declaration
dotnet_diagnostic.CA1725.severity = error
# CA1727: Use PascalCase for named placeholders
dotnet_diagnostic.CA1727.severity = error
# CA1802: Use literals where appropriate
dotnet_diagnostic.CA1802.severity = error
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = error
# CA1810: Do not initialize unnecessarily
dotnet_diagnostic.CA1810.severity = error
# CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = error
# CA1821: Remove empty Finalizers
dotnet_diagnostic.CA1821.severity = error
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = error
dotnet_code_quality.CA1822.api_surface = private, internal
# CA1823: Avoid unused private fields
dotnet_diagnostic.CA1823.severity = error
# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = error
# CA1827: Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = error
# CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
dotnet_diagnostic.CA1828.severity = error
# CA1829: Use Length/Count property instead of Count() when available
dotnet_diagnostic.CA1829.severity = error
# CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder
dotnet_diagnostic.CA1830.severity = error
# CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
# CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
# CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate
dotnet_diagnostic.CA1831.severity = error
dotnet_diagnostic.CA1832.severity = error
dotnet_diagnostic.CA1833.severity = error
# CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1834.severity = error
# CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = error
# CA1836: Prefer IsEmpty over Count
dotnet_diagnostic.CA1836.severity = error
# CA1837: Use 'Environment.ProcessId'
dotnet_diagnostic.CA1837.severity = error
# CA1838: Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1838.severity = error
# CA1839: Use 'Environment.ProcessPath'
dotnet_diagnostic.CA1839.severity = error
# CA1840: Use 'Environment.CurrentManagedThreadId'
dotnet_diagnostic.CA1840.severity = error
# CA1841: Prefer Dictionary.Contains methods
dotnet_diagnostic.CA1841.severity = error
# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = error
# CA1845: Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = error
# CA1846: Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = error
# CA1855: Prefer 'Clear' over 'Fill'
dotnet_diagnostic.CA1855.severity = error
# CA1858: Use 'StartsWith' instead of 'IndexOf'
dotnet_diagnostic.CA1858.severity = error
# CA2007: Do not directly await a Task
dotnet_diagnostic.CA2007.severity = suggestion
# CA2008: Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = error
# CA2009: Do not call ToImmutableCollection on an ImmutableCollection value
dotnet_diagnostic.CA2009.severity = error
# CA2011: Avoid infinite recursion
dotnet_diagnostic.CA2011.severity = error
# CA2012: Use ValueTask correctly
dotnet_diagnostic.CA2012.severity = error
# CA2013: Do not use ReferenceEquals with value types
dotnet_diagnostic.CA2013.severity = error
# CA2014: Do not use stackalloc in loops.
dotnet_diagnostic.CA2014.severity = error
# CA2016: Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = error
# CA2245: Do not assign a property to itself
dotnet_diagnostic.CA2245.severity = error
# CA2246: Assigning symbol and its member in the same statement
dotnet_diagnostic.CA2246.severity = error
# CA2249: Use string.Contains instead of string.IndexOf to improve readability.
dotnet_diagnostic.CA2249.severity = error
# IDE0011: Curly braces to surround blocks of code
dotnet_diagnostic.IDE0011.severity = suggestion
# IDE0020: Use pattern matching to avoid is check followed by a cast (with variable)
dotnet_diagnostic.IDE0020.severity = error
# IDE0038: Use pattern matching to avoid is check followed by a cast (without variable)
dotnet_diagnostic.IDE0038.severity = error
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = error
# IDE0062: Make local function static
dotnet_diagnostic.IDE0062.severity = error
# IDE0161: Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = error
# IDE0200: Lambda expression can be removed
dotnet_diagnostic.IDE0200.severity = error
# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = error
# IDE0066: Use switch expression
dotnet_diagnostic.IDE0066.severity = error
# IDE0078: Use pattern matching
dotnet_diagnostic.IDE0078.severity = error
# IDE0083: Use pattern matching (not operator)
dotnet_diagnostic.IDE0083.severity = error
# IDE2000: Disallow multiple blank lines
dotnet_style_allow_multiple_blank_lines_experimental = false
dotnet_diagnostic.IDE2000.severity = error
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:error
# CA1304: Specify CultureInfo
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304
dotnet_diagnostic.CA1304.severity = error
# CA1305: Specify IFormatProvider
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305
dotnet_diagnostic.CA1305.severity = error
# CA1307: Specify StringComparison for clarity
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307
dotnet_diagnostic.CA1307.severity = error
# CA1309: Use ordinal string comparison
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309
dotnet_diagnostic.CA1309.severity = error
# CA1310: Specify StringComparison for correctness
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310
dotnet_diagnostic.CA1310.severity = error
# CA1311: Specify a culture or use an invariant version
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1311
dotnet_diagnostic.CA1311.severity = error
# CA1820: Test for empty strings using string length
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1820
dotnet_diagnostic.CA1820.severity = error
# CA2251: Use 'string.Equals'
# Help link: https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2251
dotnet_diagnostic.CA2251.severity = error
# CA1069: Enums should not have duplicate values
dotnet_diagnostic.CA1069.severity = error
# CA1068: CancellationToken parameters must come last
dotnet_diagnostic.CA1068.severity = error
# CA1063: Implement IDisposable correctly
dotnet_diagnostic.CA1063.severity = error
# CA2100: Review SQL queries for security vulnerabilities
dotnet_diagnostic.CA2100.severity = error
# CA3001: Review code for SQL injection vulnerabilities
dotnet_diagnostic.CA3001.severity = error
# CA3002: Review code for XSS vulnerabilities
dotnet_diagnostic.CA3002.severity = error
# CA3007: Review code for open redirect vulnerabilities
dotnet_diagnostic.CA3007.severity = error
# CA2215: Dispose methods should call base class dispose
dotnet_diagnostic.CA2215.severity = error
# CA2213: Disposable fields should be disposed
dotnet_diagnostic.CA2213.severity = error
# CA1801: Review unused parameters
dotnet_diagnostic.CA1801.severity = error
# CA1860: Avoid using 'Enumerable.Any()' extension method
dotnet_diagnostic.CA1860.severity = error
# CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = error
# CA1500: Variable names should not match field names
dotnet_diagnostic.CA1500.severity = error
# CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
dotnet_diagnostic.CA1864.severity = error
# CA1848: Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = error
# CA2250: Use ThrowIfCancellationRequested
dotnet_diagnostic.CA2250.severity = error
# CA2248: Provide correct enum argument to Enum.HasFlag
dotnet_diagnostic.CA2248.severity = error
# CA2244: Do not duplicate indexed element initializations
dotnet_diagnostic.CA2244.severity = error
# CA5394: Do not use insecure randomness
dotnet_diagnostic.CA5394.severity = error
# CA1064: Exceptions should be public
dotnet_diagnostic.CA1064.severity = error
# CA1032: Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = error
# CA1027: Mark enums with FlagsAttribute
dotnet_diagnostic.CA1027.severity = error
# CA2217: Do not mark enums with FlagsAttribute
dotnet_diagnostic.CA2217.severity = error
# Use 'nameof' (IDE0280)
dotnet_diagnostic.IDE0280.severity = error
# CA1707: Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = error
# CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = error
# CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
dotnet_diagnostic.CA1862.severity = error
# CA1868: Unnecessary call to 'Contains' for sets
dotnet_diagnostic.CA1868.severity = error
# CA1870: Use a cached 'SearchValues' instance
dotnet_diagnostic.CA1870.severity = error
# Member can be made 'readonly' (IDE0251)
dotnet_diagnostic.IDE0251.severity = error
# Nullable directive is redundant (IDE0240)
dotnet_diagnostic.IDE0240.severity = error
# Nullable directive is unnecessary (IDE0241)
dotnet_diagnostic.IDE0241.severity = error
#CA1819: Properties should not return arrays
dotnet_diagnostic.CA1819.severity = error
#IDE0120: Simplify LINQ expression (IDE0120)
dotnet_diagnostic.IDE0120.severity = error
#IDE0065: 'using' directive placement (IDE0065)
dotnet_diagnostic.IDE0065.severity = error
[*.cs]
# force file scoped namespaces
csharp_style_namespace_declarations = file_scoped:error
# CA1012: Abstract types should not have public constructors
dotnet_diagnostic.CA1012.severity = error
# dotnet_diagnostic.IDE1006.severity
dotnet_diagnostic.IDE1006.severity = error
# dotnet_diagnostic.IDE0160.severity
dotnet_diagnostic.IDE0160.severity = error
# dotnet_diagnostic.IDE0130.severity
dotnet_diagnostic.IDE0130.severity = error
# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = suggestion
# CA1308: In method 'urlToLower', replace the call to 'ToLowerInvariant' with 'ToUpperInvariant' (CA1308)
dotnet_diagnostic.CA1308.severity = suggestion
# CA1040: Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = suggestion
# S2479: Replace the control character at position 7 by its escape sequence
dotnet_diagnostic.S2479.severity = suggestion
# CA1056: Change the type of property 'Url' from 'string' to 'System.Uri'
dotnet_diagnostic.CA1056.severity = suggestion
# CA1054: Change the type of parameter of the method to allow a Uri to be passed as a 'System.Uri' object
dotnet_diagnostic.CA1054.severity = suggestion
# CA1055: Change the return type of method from 'string' to 'System.Uri'
dotnet_diagnostic.CA1055.severity = suggestion
# S4457: Split this method into two, one handling parameters check and the other handling the asynchronous code.
dotnet_diagnostic.S4457.severity = suggestion
# AsyncFixer01: Unnecessary async/await usage
dotnet_diagnostic.AsyncFixer01.severity = suggestion
# AsyncFixer02: Long-running or blocking operations inside an async method
dotnet_diagnostic.AsyncFixer02.severity = error
# VSTHRD103: Call async methods when in an async method
dotnet_diagnostic.VSTHRD103.severity = error
# AsyncFixer03: Fire & forget async void methods
dotnet_diagnostic.AsyncFixer03.severity = error
# VSTHRD100: Avoid async void methods
dotnet_diagnostic.VSTHRD100.severity = error
# VSTHRD101: Avoid unsupported async delegates
dotnet_diagnostic.VSTHRD101.severity = error
# VSTHRD107: Await Task within using expression
dotnet_diagnostic.VSTHRD107.severity = error
# AsyncFixer04: Fire & forget async call inside a using block
dotnet_diagnostic.AsyncFixer04.severity = error
# VSTHRD110: Observe result of async calls
dotnet_diagnostic.VSTHRD110.severity = error
# VSTHRD002: Avoid problematic synchronous waits
dotnet_diagnostic.VSTHRD002.severity = error
# AsyncifyInvocation: Use Task Async
dotnet_diagnostic.AsyncifyInvocation.severity = error
# AsyncifyVariable: Use Task Async
dotnet_diagnostic.AsyncifyVariable.severity = error
# VSTHRD111: Use ConfigureAwait(bool)
dotnet_diagnostic.VSTHRD111.severity = error
# VSTHRD114: Avoid returning a null Task
dotnet_diagnostic.VSTHRD114.severity = error
# VSTHRD200: Use "Async" suffix for async methods
dotnet_diagnostic.VSTHRD200.severity = suggestion
#AsyncFixer05: Downcasting from a nested task to an outer task.
dotnet_diagnostic.AsyncFixer05.severity = error
#CA1819: Properties should not return arrays
dotnet_diagnostic.CA1819.severity = suggestion
# Sonar --------------------------------------------------
# S125: Sections of code should not be commented out
dotnet_diagnostic.S125.severity = suggestion
# S2094: Classes should not be empty
dotnet_diagnostic.S2094.severity = suggestion
# Unnecessary bit operations should not be performed
dotnet_diagnostic.S2437.severity = warning
# MA -----------------------------------------------------
MA0051.maximum_lines_per_method = 80
MA0051.maximum_statements_per_method = 60
MA0011.exclude_tostring_methods=true
dotnet_diagnostic.MA0089.severity = error
# MA0080: Use a cancellation token using .WithCancellation()
dotnet_diagnostic.MA0080.severity = error
# MA0022: Return Task.FromResult instead of returning null
dotnet_diagnostic.MA0022.severity = error
# MA0045: Do not use blocking call (make method async)
dotnet_diagnostic.MA0045.severity = error
# MA0026 : Complete the task
# MA0028 - Optimize StringBuilder usage
dotnet_diagnostic.MA0028.severity = error
# MA0029 - Combine LINQ methods
dotnet_diagnostic.MA0029.severity = error
# MA0044 - Remove useless ToString call
dotnet_diagnostic.MA0044.severity = error
# MA0052 - Replace constant Enum.ToString with nameof
dotnet_diagnostic.MA0052.severity = error
# MA0063 - Use Where before OrderBy
dotnet_diagnostic.MA0063.severity = error
# MA0078 - Use 'Cast' instead of 'Select' to cast
dotnet_diagnostic.MA0078.severity = error
# MA0105 - Use the lambda parameters instead of using a closure
dotnet_diagnostic.MA0105.severity = error
# MA0106 - Avoid closure by using an overload with the 'factoryArgument' parameter
dotnet_diagnostic.MA0106.severity = error
# MA0110 - Use the Regex source generator
dotnet_diagnostic.MA0110.severity = error
#MA0053 - Sealed Class
dotnet_diagnostic.MA0053.severity = error
MA0053.public_class_should_be_sealed = true
MA0053.class_with_virtual_member_should_be_sealed = true
MA0053.exceptions_should_be_sealed = true
#MA0067 - Use Guid.Empty
dotnet_diagnostic.MA0067.severity = error
# MA0102 - Make member readonly
dotnet_diagnostic.MA0102.severity = error
# MA0111 - Use string.Create instead of FormattableString
dotnet_diagnostic.MA0111.severity = error
# MA0152 - Use Unwrap instead of using await twice
dotnet_diagnostic.MA0152.severity = error
# Code Metric
dotnet_diagnostic.CA1501.severity = error
dotnet_diagnostic.CA1502.severity = error
dotnet_diagnostic.CA1505.severity = error
#dotnet_diagnostic.CA1506.severity = error
dotnet_diagnostic.CA1507.severity = error
#CA1508: Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = error
#CA1514: Avoid redundant length argument
dotnet_diagnostic.CA1514.severity = error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment