1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 00:19:00 +03:00

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.
This commit is contained in:
Octol1ttle 2023-12-17 19:08:24 +05:00 committed by GitHub
parent 8594dfdb9b
commit b284ac28d5
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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