Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expression body syntax or statement bodies? #11

Open
YVbakker opened this issue Sep 5, 2024 · 1 comment
Open

Expression body syntax or statement bodies? #11

YVbakker opened this issue Sep 5, 2024 · 1 comment
Labels
code quality Improvements to code style, structure, or coverage without adding new features or fixing bugs. documentation Improvements or additions to documentation

Comments

@YVbakker
Copy link
Contributor

YVbakker commented Sep 5, 2024

In .editorconfig it's set to csharp_style_expression_bodied_methods = false:suggestion

However, in build/.editorconfig this is set to 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.

@eNeRGy164
Copy link
Member

The files in the build directory are provided by Nuke.

I'm not against using them, if code remains readable.

@eNeRGy164 eNeRGy164 added documentation Improvements or additions to documentation code quality Improvements to code style, structure, or coverage without adding new features or fixing bugs. labels Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Improvements to code style, structure, or coverage without adding new features or fixing bugs. documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants