From 6602fec315293bd3c55500f43b1dd6d07f1275d4 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Tue, 1 Oct 2024 23:21:33 +0200 Subject: [PATCH] Update readme-tree.yaml --- .editorconfig | 56 ++++++++++++++++++++++++++++++ .github/workflows/readme-tree.yaml | 12 +++---- 2 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..cd24f8a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,56 @@ +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.cs] +# Rule: Set personal preferences for analyzer diagnostics +csharp_style_expression_bodied_accessors = when_on_single_line +csharp_style_expression_bodied_constructors = when_on_single_line +csharp_style_expression_bodied_indexers = when_on_single_line +csharp_style_expression_bodied_lambdas = when_on_single_line +csharp_style_expression_bodied_local_functions = when_on_single_line +csharp_style_expression_bodied_methods = when_on_single_line +csharp_style_expression_bodied_operators = when_on_single_line +csharp_prefer_braces = when_multiline +csharp_style_namespace_declarations = file_scoped +csharp_style_var_elsewhere = true +csharp_style_var_when_type_is_apparent = true +dotnet_sort_system_directives_first = true +dotnet_style_require_accessibility_modifiers = omit_if_default + +# Define what we will treat as private fields. +dotnet_naming_symbols.private_fields.applicable_kinds = field +dotnet_naming_symbols.private_fields.applicable_accessibilities = private +# Define rule that something must begin with an underscore and be in camel case. +dotnet_naming_style.require_underscore_prefix_and_camel_case.required_prefix = _ +dotnet_naming_style.require_underscore_prefix_and_camel_case.capitalization = camel_case +# Apply our rule to private fields. +dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.symbols = private_fields +dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.style = require_underscore_prefix_and_camel_case +dotnet_naming_rule.private_fields_must_begin_with_underscore_and_be_in_camel_case.severity = warning + +# Define what we will treat as constants. +dotnet_naming_symbols.constants.applicable_kinds = field, local +dotnet_naming_symbols.constants.required_modifiers = const +# Define rule that constants should be in Pascal case. +dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants +dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style +# Apply our rule to constants. +dotnet_naming_style.constant_style.capitalization = pascal_case + +# Disable CA1014 +dotnet_diagnostic.CA1014.severity = none + +[*.{received,verified}.*] +generated_code = true + +[**/*Tests.cs] +dotnet_diagnostic.CA1707.severity = none diff --git a/.github/workflows/readme-tree.yaml b/.github/workflows/readme-tree.yaml index 46e628e..df8b3ad 100644 --- a/.github/workflows/readme-tree.yaml +++ b/.github/workflows/readme-tree.yaml @@ -13,17 +13,15 @@ jobs: tree: runs-on: ubuntu-latest name: readme-tree + permissions: + contents: write steps: - uses: actions/checkout@v4 - name: Create README Tree uses: RavelloH/readme-tree@v1.1.0 with: showdirectoryname: "yes" - - name: Create Pull Request - uses: peter-evans/create-pull-request@v7 + - name: Commit README tree changes + uses: stefanzweifel/git-auto-commit-action@v5 with: - branch: update-readme-tree - commit-message: Update README Tree - title: Update README Tree - body: This PR includes new updates to the README Tree. - labels: chore + commit_message: Commit README tree changes