|
| 1 | +# .NET Code Style |
| 2 | +# IDE styles reference: https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ |
| 3 | +is_global = true |
| 4 | + |
| 5 | +# IDE0001: Simplify names |
| 6 | +dotnet_diagnostic.IDE0001.severity = warning |
| 7 | + |
| 8 | +# IDE0002: Simplify member access |
| 9 | +dotnet_diagnostic.IDE0002.severity = warning |
| 10 | + |
| 11 | +# IDE0003: Remove qualification |
| 12 | +dotnet_diagnostic.IDE0003.severity = warning |
| 13 | + |
| 14 | +# IDE0004: Remove unnecessary cast |
| 15 | +dotnet_diagnostic.IDE0004.severity = warning |
| 16 | + |
| 17 | +# IDE0005: Remove unnecessary imports |
| 18 | +dotnet_diagnostic.IDE0005.severity = warning |
| 19 | + |
| 20 | +# IDE0034: Simplify default literal |
| 21 | +dotnet_diagnostic.IDE0034.severity = warning |
| 22 | + |
| 23 | +# IDE0036: Sort modifiers |
| 24 | +dotnet_diagnostic.IDE0036.severity = warning |
| 25 | + |
| 26 | +# IDE0040: Add accessibility modifier |
| 27 | +dotnet_diagnostic.IDE0040.severity = warning |
| 28 | + |
| 29 | +# IDE0049: Use keyword for type name |
| 30 | +dotnet_diagnostic.IDE0040.severity = warning |
| 31 | + |
| 32 | +# IDE0055: Fix formatting |
| 33 | +dotnet_diagnostic.IDE0055.severity = warning |
| 34 | + |
| 35 | +# IDE0051: Private method is unused |
| 36 | +dotnet_diagnostic.IDE0051.severity = silent |
| 37 | + |
| 38 | +# IDE0052: Private member is unused |
| 39 | +dotnet_diagnostic.IDE0052.severity = silent |
| 40 | + |
| 41 | +# IDE0073: File header |
| 42 | +dotnet_diagnostic.IDE0073.severity = warning |
| 43 | + |
| 44 | +# IDE0130: Namespace mismatch with folder |
| 45 | +dotnet_diagnostic.IDE0130.severity = warning |
| 46 | + |
| 47 | +# IDE1006: Naming style |
| 48 | +dotnet_diagnostic.IDE1006.severity = warning |
| 49 | + |
| 50 | +# CA1305: Specify IFormatProvider |
| 51 | +# Too many noisy warnings for parsing/formatting numbers |
| 52 | +dotnet_diagnostic.CA1305.severity = none |
| 53 | + |
| 54 | +# CA1507: Use nameof to express symbol names |
| 55 | +# Flaggs serialization name attributes |
| 56 | +dotnet_diagnostic.CA1507.severity = suggestion |
| 57 | + |
| 58 | +# CA1806: Do not ignore method results |
| 59 | +# The usages for numeric parsing are explicitly optional |
| 60 | +dotnet_diagnostic.CA1806.severity = suggestion |
| 61 | + |
| 62 | +# CA1822: Mark members as static |
| 63 | +# Potential false positive around reflection/too much noise |
| 64 | +dotnet_diagnostic.CA1822.severity = none |
| 65 | + |
| 66 | +# CA1826: Do not use Enumerable method on indexable collections |
| 67 | +dotnet_diagnostic.CA1826.severity = suggestion |
| 68 | + |
| 69 | +# CA1859: Use concrete types when possible for improved performance |
| 70 | +# Involves design considerations |
| 71 | +dotnet_diagnostic.CA1859.severity = suggestion |
| 72 | + |
| 73 | +# CA1860: Avoid using 'Enumerable.Any()' extension method |
| 74 | +dotnet_diagnostic.CA1860.severity = suggestion |
| 75 | + |
| 76 | +# CA1861: Avoid constant arrays as arguments |
| 77 | +# Outdated with collection expressions |
| 78 | +dotnet_diagnostic.CA1861.severity = suggestion |
| 79 | + |
| 80 | +# CA2007: Consider calling ConfigureAwait on the awaited task |
| 81 | +dotnet_diagnostic.CA2007.severity = warning |
| 82 | + |
| 83 | +# CA2016: Forward the 'CancellationToken' parameter to methods |
| 84 | +# Some overloads are having special handling for debugger |
| 85 | +dotnet_diagnostic.CA2016.severity = suggestion |
| 86 | + |
| 87 | +# CA2021: Do not call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types |
| 88 | +# Causing a lot of false positives with generics |
| 89 | +dotnet_diagnostic.CA2021.severity = none |
| 90 | + |
| 91 | +# CA2101: Specify marshaling for P/Invoke string arguments |
| 92 | +# Reports warning for all non-UTF16 usages on DllImport; consider migrating to LibraryImport |
| 93 | +dotnet_diagnostic.CA2101.severity = none |
| 94 | + |
| 95 | +# CA2201: Do not raise reserved exception types |
| 96 | +dotnet_diagnostic.CA2201.severity = warning |
| 97 | + |
| 98 | +# CA2208: Instantiate argument exceptions correctly |
| 99 | +dotnet_diagnostic.CA2208.severity = suggestion |
| 100 | + |
| 101 | +# CA2242: Test for NaN correctly |
| 102 | +dotnet_diagnostic.CA2242.severity = warning |
| 103 | + |
| 104 | +# Banned APIs |
| 105 | +dotnet_diagnostic.RS0030.severity = error |
| 106 | + |
| 107 | +# Temporarily disable analysing CanBeNull = true in NRT contexts due to mobile issues. |
| 108 | +# See: https://github.com/ppy/osu/pull/19677 |
| 109 | +dotnet_diagnostic.OSUF001.severity = none |
0 commit comments