From b284ac28d506e2199d19e10e0d85d84bddf21f94 Mon Sep 17 00:00:00 2001 From: Octol1ttle Date: Sun, 17 Dec 2023 19:08:24 +0500 Subject: [PATCH] Disable "Convert to Primary Constructor" warning (#216) Me and other .NET developers hold the stance that primary constructors are not ready for production use, particularly with dependency injection. There are debates regarding the styling of primary constructors, but the bigger issue is that a primary constructor parameter cannot be made `readonly` (which is crucial with dependency injection). The inspection "Convert to Primary Constructor" was disabled in ReSharper CLI when we updated to .NET 8, but the warning is still present for ReSharper and Rider users. This PR disables this warning to avoid developers accidentally using a primary constructor. --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 4982036..ff9c068 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1022,7 +1022,7 @@ resharper_convert_to_constant_local_highlighting = warning resharper_convert_to_lambda_expression_highlighting = warning resharper_convert_to_local_function_highlighting = warning resharper_convert_to_null_coalescing_compound_assignment_highlighting = warning -resharper_convert_to_primary_constructor_highlighting = warning +resharper_convert_to_primary_constructor_highlighting = none resharper_convert_to_static_class_highlighting = warning resharper_convert_to_using_declaration_highlighting = warning resharper_convert_type_check_pattern_to_null_check_highlighting = warning