From 1931227fc32760671e178a67a52bb5b1473a6bc1 Mon Sep 17 00:00:00 2001 From: "bhom-devops[bot]" Date: Tue, 28 Apr 2026 08:31:40 +0000 Subject: [PATCH] chore: update .editorconfig from CI_Toolkit --- .editorconfig | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..cb8852b00 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,59 @@ +# This file is managed by the BHoM platform team and centrally distributed to all active repos. +# It is used by CI to enforce code formatting and naming standards via dotnet format. +# Do not edit this file directly in your repository — changes will be overwritten. +# To propose a change, open an issue or PR in BuroHappoldEngineeringAdmin/CI_Toolkit. + +root = true + +# All files — space indent (4), LF line endings, trim trailing whitespace, insert final newline, UTF-8. +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +# Project and config files use 2-space indent by convention. +[*.{csproj,props,targets}] +indent_size = 2 + +[*.{yml,yaml,json}] +indent_size = 2 + +# Markdown: preserve trailing two-space hard line breaks (CommonMark
syntax). +[*.md] +trim_trailing_whitespace = false + +[*.cs] +# IDE1006 — Method names must be PascalCase. +dotnet_naming_rule.methods_pascal_case.symbols = method_symbols +dotnet_naming_rule.methods_pascal_case.style = pascal_case_style +dotnet_naming_rule.methods_pascal_case.severity = error + +dotnet_naming_symbols.method_symbols.applicable_kinds = method + +# IDE1006 — Parameter names must be camelCase. +dotnet_naming_rule.parameters_camel_case.symbols = parameter_symbols +dotnet_naming_rule.parameters_camel_case.style = camel_case_style +dotnet_naming_rule.parameters_camel_case.severity = error + +dotnet_naming_symbols.parameter_symbols.applicable_kinds = parameter + +dotnet_naming_style.pascal_case_style.capitalization = pascal_case +dotnet_naming_style.camel_case_style.capitalization = camel_case + +# IDE0005 — Remove unnecessary using directives. +dotnet_diagnostic.IDE0005.severity = warning + +# IDE0036 — Enforce consistent modifier order (e.g. public static, not static public). +csharp_preferred_modifier_order = public, private, protected, internal, file, static, extern, new, virtual, abstract, sealed, override, readonly, required, unsafe, volatile, async +dotnet_diagnostic.IDE0036.severity = warning + +# IDE0044 — Add readonly to fields never reassigned after construction. +dotnet_style_readonly_field = true +dotnet_diagnostic.IDE0044.severity = suggestion + +# IDE0060 — Remove unused parameters. +dotnet_code_quality_unused_parameters = all +dotnet_diagnostic.IDE0060.severity = warning