Open YVbakker opened 1 month ago
In .editorconfig it's set to csharp_style_expression_bodied_methods = false:suggestion
.editorconfig
csharp_style_expression_bodied_methods = false:suggestion
However, in build/.editorconfig this is set to csharp_style_expression_bodied_methods = true
build/.editorconfig
csharp_style_expression_bodied_methods = true
Which one is preferred and why? In what cases?
I ask because I can see most methods use a statement body while not always necessary, but for example in https://github.com/dendrodocs/dotnet-shared-lib/blob/main/src/DendroDocs.Shared/Descriptions/TypeDescription.cs expression bodies are used.
The files in the build directory are provided by Nuke.
I'm not against using them, if code remains readable.
In
.editorconfig
it's set tocsharp_style_expression_bodied_methods = false:suggestion
However, in
build/.editorconfig
this is set tocsharp_style_expression_bodied_methods = true
Which one is preferred and why? In what cases?
I ask because I can see most methods use a statement body while not always necessary, but for example in https://github.com/dendrodocs/dotnet-shared-lib/blob/main/src/DendroDocs.Shared/Descriptions/TypeDescription.cs expression bodies are used.