From 766a6f2ef51167cefa08740512dfaff486b41254 Mon Sep 17 00:00:00 2001 From: pisolofin Date: Wed, 14 Aug 2024 17:25:00 +0200 Subject: [PATCH 1/3] Fix actions --- .github/workflows/deploy_playground.yml | 4 +-- .github/workflows/deploy_website.yml | 11 +++--- .github/workflows/format_repositories.yml | 42 +++++++++++------------ .github/workflows/publish_nuget.yml | 2 +- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/workflows/deploy_playground.yml b/.github/workflows/deploy_playground.yml index 0bedf661c..587e70a83 100644 --- a/.github/workflows/deploy_playground.yml +++ b/.github/workflows/deploy_playground.yml @@ -1,6 +1,6 @@ name: Deploy Playground -on: - workflow_dispatch +# on: +# workflow_dispatch jobs: deploy: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy_website.yml b/.github/workflows/deploy_website.yml index 82398c869..d3c860215 100644 --- a/.github/workflows/deploy_website.yml +++ b/.github/workflows/deploy_website.yml @@ -1,9 +1,10 @@ name: Deploy Website -on: - push: - branches: [ main ] - paths: - - 'Src/Website/**' + +# on: +# push: +# branches: [ main ] +# paths: +# - 'Src/Website/**' jobs: deploy: diff --git a/.github/workflows/format_repositories.yml b/.github/workflows/format_repositories.yml index 5eb8823e8..8b769c513 100644 --- a/.github/workflows/format_repositories.yml +++ b/.github/workflows/format_repositories.yml @@ -1,21 +1,21 @@ -name: Format Repositories -on: - push: - branches: [ main ] - paths: - - "Src/CSharpier/**/*" - -jobs: - format_repositories: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - path: csharpier - - uses: actions/setup-dotnet@v3 - - uses: actions/checkout@v2 - with: - repository: belav/csharpier-repos - path: csharpier-repos - - run: dotnet build csharpier/Src/CSharpier.Cli/CSharpier.Cli.csproj -c release - - run: dotnet csharpier/Src/CSharpier.Cli/bin/release/net7.0/dotnet-csharpier.dll csharpier-repos --skip-write +# name: Format Repositories +# on: +# push: +# branches: [ main ] +# paths: +# - "Src/CSharpier/**/*" +# +# jobs: +# format_repositories: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# with: +# path: csharpier +# - uses: actions/setup-dotnet@v3 +# - uses: actions/checkout@v2 +# with: +# repository: belav/csharpier-repos +# path: csharpier-repos +# - run: dotnet build csharpier/Src/CSharpier.Cli/CSharpier.Cli.csproj -c release +# - run: dotnet csharpier/Src/CSharpier.Cli/bin/release/net7.0/dotnet-csharpier-config.dll csharpier-repos --skip-write diff --git a/.github/workflows/publish_nuget.yml b/.github/workflows/publish_nuget.yml index 40afd5dd8..0e097a489 100644 --- a/.github/workflows/publish_nuget.yml +++ b/.github/workflows/publish_nuget.yml @@ -1,7 +1,7 @@ name: Publish Nuget on: push: - branches: [ build-fix ] + branches: [ main ] workflow_dispatch: jobs: test: From 46b75ce20c15443b008a3b7e53282354873cde48 Mon Sep 17 00:00:00 2001 From: pisolofin Date: Wed, 14 Aug 2024 17:37:22 +0200 Subject: [PATCH 2/3] Readme update --- Nuget/README.md | 18 ++++++++++++++++++ README.md | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Nuget/README.md b/Nuget/README.md index 985358a97..e09913cf6 100644 --- a/Nuget/README.md +++ b/Nuget/README.md @@ -19,3 +19,21 @@ All documentation you find about `CSharpier` is also valid for `CSharpier-Config - `dotnet csharpier` -> `dotnet csharpier-config` - `dotnet-csharpier` -> `dotnet-csharpier-config` + +**New feature** + +- Support to all [C# formatting options](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options) into `.editorconfig` file + +```csharp +# CSharp formatting rules: +[*.cs] +csharp_new_line_before_open_brace = methods, properties, control_blocks, types +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true +``` + +For more information, please refer to the [documentation](/docs/Configuration.md) diff --git a/README.md b/README.md index 48416df9a..94c3c536e 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,21 @@ All documentation you find about `CSharpier` is also valid for `CSharpier-Config - `dotnet csharpier` -> `dotnet csharpier-config` - `dotnet-csharpier` -> `dotnet-csharpier-config` + +**New feature** + +- Support to all [C# formatting options](https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options) into `.editorconfig` file + +```csharp +# CSharp formatting rules: +[*.cs] +csharp_new_line_before_open_brace = methods, properties, control_blocks, types +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true +``` + +For more information, please refer to the [documentation](/docs/Configuration.md) From df169657d97c1baef5b705da5d21412f8d07f726 Mon Sep 17 00:00:00 2001 From: pisolofin Date: Wed, 14 Aug 2024 17:46:03 +0200 Subject: [PATCH 3/3] Update version --- Nuget/Build.props | 2 +- Nuget/README.md | 2 +- README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Nuget/Build.props b/Nuget/Build.props index 9f37cf5b4..3164732c8 100644 --- a/Nuget/Build.props +++ b/Nuget/Build.props @@ -1,6 +1,6 @@ - 0.0.3 + 0.28.1.1 MIT https://github.com/pisolofin/csharpier-editorconfig git diff --git a/Nuget/README.md b/Nuget/README.md index e09913cf6..be926edfc 100644 --- a/Nuget/README.md +++ b/Nuget/README.md @@ -1,4 +1,4 @@ -This is as non opinionated version of [csharpier](https://github.com/belav/csharpier) tool created to add EditorConfig file style guide, allowing users to define and apply custom styling options. +This is as non opinionated version of [csharpier](https://github.com/belav/csharpier) version 0.28.1 tool created to add EditorConfig file style guide, allowing users to define and apply custom styling options. ### Quick Start Install CSharpier-Config globally using the following command. diff --git a/README.md b/README.md index 94c3c536e..17c444350 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # csharpier-config -This is as non opinionated version of [csharpier](https://github.com/belav/csharpier) tool created to add EditorConfig file style guide, allowing users to define and apply custom styling options. +This is as non opinionated version of [csharpier](https://github.com/belav/csharpier) version 0.28.1 tool created to add EditorConfig file style guide, allowing users to define and apply custom styling options. I started implementing these options in a separate branch called [feature/brackets](https://github.com/pisolofin/csharpier-editorconfig/tree/feature/brackets).