|
1 | 1 | # ATC coding rules - https://github.com/atc-net/atc-coding-rules
|
2 |
| -# Version: 1.0.0 |
3 |
| -# Updated: 25-09-2023 |
| 2 | +# Version: 1.0.1 |
| 3 | +# Updated: 03-06-2024 |
4 | 4 | # Location: Root
|
5 | 5 | # Distribution: DotNet8
|
6 | 6 | # Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
|
@@ -464,10 +464,45 @@ dotnet_diagnostic.MA0048.severity = error # https://github.com/atc-net
|
464 | 464 | dotnet_diagnostic.CA1014.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1014.md
|
465 | 465 | dotnet_diagnostic.CA1068.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1068.md
|
466 | 466 | dotnet_diagnostic.CA1305.severity = error
|
| 467 | +dotnet_diagnostic.CA1510.severity = suggestion # Use ArgumentNullException throw helper |
| 468 | +dotnet_diagnostic.CA1511.severity = suggestion # Use ArgumentException throw helper |
| 469 | +dotnet_diagnostic.CA1512.severity = suggestion # Use ArgumentOutOfRangeException throw helper |
| 470 | +dotnet_diagnostic.CA1513.severity = suggestion # Use ObjectDisposedException throw helper |
| 471 | +dotnet_diagnostic.CA1514.severity = error # Avoid redundant length argument |
467 | 472 | dotnet_diagnostic.CA1707.severity = error # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1707.md
|
468 | 473 | dotnet_diagnostic.CA1812.severity = none
|
469 | 474 | dotnet_diagnostic.CA1822.severity = suggestion
|
| 475 | +dotnet_diagnostic.CA1849.severity = error # Call async methods when in an async method |
| 476 | +dotnet_diagnostic.CA1854.severity = suggestion # Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method |
| 477 | +dotnet_diagnostic.CA1855.severity = suggestion # Prefer 'Clear' over 'Fill' |
| 478 | +dotnet_diagnostic.CA1856.severity = error # Incorrect usage of ConstantExpected attribute |
| 479 | +dotnet_diagnostic.CA1857.severity = suggestion # A constant is expected for the parameter |
| 480 | +dotnet_diagnostic.CA1858.severity = suggestion # Use 'StartsWith' instead of 'IndexOf' |
| 481 | +dotnet_diagnostic.CA1859.severity = suggestion # Use concrete types when possible for improved performance |
| 482 | +dotnet_diagnostic.CA1860.severity = suggestion # Avoid using 'Enumerable.Any()' extension method |
| 483 | +dotnet_diagnostic.CA1861.severity = suggestion # Avoid constant arrays as arguments |
| 484 | +dotnet_diagnostic.CA1862.severity = error # Use the 'StringComparison' method overloads to perform case-insensitive string comparisons |
| 485 | +dotnet_diagnostic.CA1863.severity = suggestion # Use 'CompositeFormat' |
| 486 | +dotnet_diagnostic.CA1864.severity = suggestion # Prefer the 'IDictionary.TryAdd(TKey, TValue)' method |
| 487 | +dotnet_diagnostic.CA1865.severity = suggestion # Use char overload |
| 488 | +dotnet_diagnostic.CA1866.severity = suggestion # Use char overload |
| 489 | +dotnet_diagnostic.CA1867.severity = suggestion # Use char overload |
| 490 | +dotnet_diagnostic.CA1868.severity = suggestion # Unnecessary call to 'Contains(item)' |
| 491 | +dotnet_diagnostic.CA1869.severity = suggestion # Cache and reuse 'JsonSerializerOptions' instances |
| 492 | +dotnet_diagnostic.CA1870.severity = suggestion # Use a cached 'SearchValues' instance |
470 | 493 | dotnet_diagnostic.CA2007.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA2007.md
|
| 494 | +dotnet_diagnostic.CA2017.severity = error # Parameter count mismatch |
| 495 | +dotnet_diagnostic.CA2018.severity = error # The count argument to Buffer.BlockCopy should specify the number of bytes to copy |
| 496 | +dotnet_diagnostic.CA2019.severity = error # ThreadStatic fields should not use inline initialization |
| 497 | +dotnet_diagnostic.CA2021.severity = error # Don't call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types |
| 498 | +dotnet_diagnostic.CA2250.severity = suggestion # Use ThrowIfCancellationRequested |
| 499 | +dotnet_diagnostic.CA2252.severity = suggestion # Opt-in to preview features should be used with caution |
| 500 | +dotnet_diagnostic.CA2253.severity = error # Named placeholders should not be numeric values |
| 501 | +dotnet_diagnostic.CA2254.severity = suggestion # Template should be a static expression |
| 502 | +dotnet_diagnostic.CA2255.severity = suggestion # The ModuleInitializer attribute should not be used in libraries |
| 503 | +dotnet_diagnostic.CA2259.severity = error # Ensure ThreadStatic is only used with static fields |
| 504 | +dotnet_diagnostic.CA2260.severity = error # Implement generic math interfaces correctly |
| 505 | +dotnet_diagnostic.CA2261.severity = error # Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult> |
471 | 506 | dotnet_diagnostic.IDE0005.severity = warning # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0005.md
|
472 | 507 | dotnet_diagnostic.IDE0058.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/IDE0058.md
|
473 | 508 |
|
|
0 commit comments