|
| 1 | +root = true |
| 2 | + |
| 3 | +[*.{cs,vb}] |
| 4 | +dotnet_analyzer_diagnostic.category-naming.severity = warning |
| 5 | +dotnet_analyzer_diagnostic.category-style.severity = warning |
| 6 | +dotnet_analyzer_diagnostic.category-maintainability.severity = warning |
| 7 | +dotnet_analyzer_diagnostic.category-formatting.severity = warning |
| 8 | +dotnet_analyzer_diagnostic.category-security.severity = warning |
| 9 | +dotnet_analyzer_diagnostic.category-performance.severity = warning |
| 10 | +dotnet_analyzer_diagnostic.category-reliability.severity = warning |
| 11 | +dotnet_analyzer_diagnostic.category-usage.severity = warning |
| 12 | + |
| 13 | +# Lower-noise categories can start at suggestion. |
| 14 | +dotnet_analyzer_diagnostic.category-design.severity = suggestion |
| 15 | +dotnet_analyzer_diagnostic.category-globalization.severity = suggestion |
| 16 | + |
| 17 | +# C# style baseline. |
| 18 | +csharp_using_directive_placement = outside_namespace:warning |
| 19 | +csharp_style_var_for_built_in_types = true:warning |
| 20 | +csharp_style_var_when_type_is_apparent = true:warning |
| 21 | +csharp_style_var_elsewhere = true:warning |
| 22 | +csharp_style_namespace_declarations = file_scoped:warning |
| 23 | + |
| 24 | +# .NET style baseline. |
| 25 | +dotnet_style_qualification_for_field = false:warning |
| 26 | +dotnet_style_qualification_for_property = false:warning |
| 27 | +dotnet_style_qualification_for_method = false:warning |
| 28 | +dotnet_style_qualification_for_event = false:warning |
| 29 | +dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning |
| 30 | +dotnet_style_object_initializer = true:warning |
| 31 | +dotnet_style_collection_initializer = true:warning |
| 32 | +dotnet_style_prefer_auto_properties = true:warning |
| 33 | +dotnet_style_null_propagation = true:warning |
| 34 | +dotnet_style_namespace_match_folder = true:warning |
| 35 | + |
| 36 | +# Public API XML documentation backlog exists; keep strict compiler warnings while not blocking rollout. |
| 37 | +dotnet_diagnostic.CS1570.severity = suggestion |
| 38 | +dotnet_diagnostic.CS1591.severity = suggestion |
| 39 | + |
| 40 | +# Legacy API version namespaces/types intentionally use underscores and versioned names. |
| 41 | +dotnet_diagnostic.CA1707.severity = suggestion |
| 42 | +dotnet_diagnostic.CA1711.severity = suggestion |
| 43 | +dotnet_diagnostic.CA1716.severity = suggestion |
| 44 | +dotnet_diagnostic.CA1720.severity = suggestion |
| 45 | + |
| 46 | +# Defer broad style-only churn in existing code. |
| 47 | +dotnet_diagnostic.IDE0011.severity = suggestion |
| 48 | +dotnet_diagnostic.IDE0022.severity = suggestion |
| 49 | +dotnet_diagnostic.IDE0028.severity = suggestion |
| 50 | +dotnet_diagnostic.IDE0040.severity = suggestion |
| 51 | +dotnet_diagnostic.IDE0048.severity = suggestion |
| 52 | +dotnet_diagnostic.IDE0055.severity = suggestion |
| 53 | +dotnet_diagnostic.IDE0058.severity = suggestion |
| 54 | +dotnet_diagnostic.IDE0072.severity = suggestion |
| 55 | +dotnet_diagnostic.IDE0078.severity = suggestion |
| 56 | +dotnet_diagnostic.IDE0130.severity = suggestion |
| 57 | +dotnet_diagnostic.IDE0161.severity = suggestion |
| 58 | +dotnet_diagnostic.IDE0240.severity = suggestion |
| 59 | +dotnet_diagnostic.IDE0305.severity = suggestion |
| 60 | +dotnet_diagnostic.IDE0306.severity = suggestion |
| 61 | + |
| 62 | +# Defer non-functional analyzer cleanups in existing code. |
| 63 | +dotnet_diagnostic.CA1068.severity = suggestion |
| 64 | +dotnet_diagnostic.CA1304.severity = suggestion |
| 65 | +dotnet_diagnostic.CA1305.severity = suggestion |
| 66 | +dotnet_diagnostic.CA1310.severity = suggestion |
| 67 | +dotnet_diagnostic.CA1311.severity = suggestion |
| 68 | +dotnet_diagnostic.CA1826.severity = suggestion |
| 69 | +dotnet_diagnostic.CA1822.severity = suggestion |
| 70 | +dotnet_diagnostic.CA1848.severity = suggestion |
| 71 | +dotnet_diagnostic.CA1860.severity = suggestion |
| 72 | +dotnet_diagnostic.CA1861.severity = suggestion |
| 73 | +dotnet_diagnostic.CA1862.severity = suggestion |
| 74 | +dotnet_diagnostic.CA1866.severity = suggestion |
| 75 | +dotnet_diagnostic.CA2016.severity = suggestion |
| 76 | +dotnet_diagnostic.CA2201.severity = suggestion |
| 77 | +dotnet_diagnostic.CA1859.severity = suggestion |
| 78 | +dotnet_diagnostic.CA2208.severity = suggestion |
| 79 | +dotnet_diagnostic.CA2249.severity = suggestion |
| 80 | +dotnet_diagnostic.CA1816.severity = suggestion |
| 81 | + |
| 82 | +dotnet_diagnostic.CS1573.severity = suggestion |
| 83 | + |
| 84 | +dotnet_diagnostic.IDE0004.severity = suggestion |
| 85 | +dotnet_diagnostic.IDE0007.severity = suggestion |
| 86 | +dotnet_diagnostic.IDE0018.severity = suggestion |
| 87 | +dotnet_diagnostic.IDE0037.severity = suggestion |
| 88 | +dotnet_diagnostic.IDE0045.severity = suggestion |
| 89 | +dotnet_diagnostic.IDE0046.severity = suggestion |
| 90 | +dotnet_diagnostic.IDE0047.severity = suggestion |
| 91 | +dotnet_diagnostic.IDE0060.severity = suggestion |
| 92 | +dotnet_diagnostic.IDE0063.severity = suggestion |
| 93 | +dotnet_diagnostic.IDE0200.severity = suggestion |
| 94 | +dotnet_diagnostic.IDE0290.severity = suggestion |
| 95 | +dotnet_diagnostic.IDE0300.severity = suggestion |
| 96 | +dotnet_diagnostic.IDE0021.severity = suggestion |
| 97 | +dotnet_diagnostic.IDE0042.severity = suggestion |
| 98 | +dotnet_diagnostic.IDE0301.severity = suggestion |
| 99 | + |
| 100 | +dotnet_diagnostic.xUnit1004.severity = suggestion |
| 101 | + |
| 102 | +# Avoid IDE0005 build coupling to GenerateDocumentationFile during standards rollout. |
| 103 | +dotnet_diagnostic.IDE0005.severity = none |
| 104 | + |
| 105 | +[**/*Tests.cs] |
| 106 | +# Keep descriptive xUnit method names with underscores for readability in test code. |
| 107 | +dotnet_diagnostic.CA1707.severity = none |
| 108 | + |
| 109 | +[*.g.cs] |
| 110 | +dotnet_analyzer_diagnostic.severity = none |
| 111 | + |
| 112 | +[*.Designer.cs] |
| 113 | +dotnet_analyzer_diagnostic.severity = none |
| 114 | + |
| 115 | +[*.generated.cs] |
| 116 | +dotnet_analyzer_diagnostic.severity = none |
| 117 | + |
| 118 | +[*.AssemblyInfo.cs] |
| 119 | +dotnet_analyzer_diagnostic.severity = none |
0 commit comments