From c72d0c3c3baf2c7b22954c32045dcda516093be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kro=CC=88ner?= Date: Thu, 26 Oct 2023 19:45:20 +0200 Subject: [PATCH] style: Update style rules for yml and csproj files 2 spaces are sufficient for indentation --- .editorconfig | 14 ++-- .github/workflows/build-and-test.yml | 76 +++++++++---------- .github/workflows/publish_tool.yml | 74 +++++++++--------- .../ConventionalChangelog.csproj | 36 ++++----- .../ConventionalChangelog.Unit.Tests.csproj | 36 ++++----- 5 files changed, 119 insertions(+), 117 deletions(-) diff --git a/.editorconfig b/.editorconfig index ca69253..8370156 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,11 +1,18 @@ [*] -charset = utf-8-bom +charset = utf-8 end_of_line = crlf trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 4 +tab_width = 4 + +[{*.yaml,*.yml,*.har,*.json,*.html,*.csproj,*.ps1}] +indent_size = 2 + +[*.cs] +max_line_length = 120 # Microsoft .NET properties csharp_new_line_before_members_in_object_initializers = false @@ -54,8 +61,3 @@ resharper_suggest_var_or_type_simple_types_highlighting = hint resharper_web_config_module_not_resolved_highlighting = warning resharper_web_config_type_not_resolved_highlighting = warning resharper_web_config_wrong_module_highlighting = warning - -[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,cc,cginc,compute,cp,cpp,cs,cshtml,cu,cuh,cxx,dtd,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,mpp,mq4,mq5,mqh,nuspec,paml,razor,resw,resx,skin,tpp,usf,ush,vb,xaml,xamlx,xoml,xsd}] -indent_style = space -indent_size = 4 -tab_width = 4 diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c061a83..a5ac859 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,43 +1,43 @@ name: build and test on: - push: - pull_request: - branches: [ main ] - paths: - - '**.cs' - - '**.csproj' + push: + pull_request: + branches: [ main ] + paths: + - '**.cs' + - '**.csproj' jobs: - build-and-test: - - name: build-and-test-${{matrix.os}} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Install dependencies - run: dotnet restore - - - name: Build - run: dotnet build --no-restore - - - name: Test - run: dotnet test --no-restore --verbosity normal - - - name: Publish - run: dotnet publish src/ConventionalChangelog/ConventionalChangelog.csproj --framework net7.0 --configuration Release --output release --nologo - - - name: Upload Build Artifact - uses: actions/upload-artifact@v3 - with: - name: Application_${{ matrix.os }} - path: release + build-and-test: + + name: build-and-test-${{matrix.os}} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macOS-latest ] + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET Core + uses: actions/setup-dotnet@v3 + with: + global-json-file: global.json + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore + + - name: Test + run: dotnet test --no-restore --verbosity normal + + - name: Publish + run: dotnet publish src/ConventionalChangelog/ConventionalChangelog.csproj --framework net7.0 --configuration Release --output release --nologo + + - name: Upload Build Artifact + uses: actions/upload-artifact@v3 + with: + name: Application_${{ matrix.os }} + path: release diff --git a/.github/workflows/publish_tool.yml b/.github/workflows/publish_tool.yml index d4f7419..0d4cbbb 100644 --- a/.github/workflows/publish_tool.yml +++ b/.github/workflows/publish_tool.yml @@ -1,42 +1,42 @@ name: publish tool on: - workflow_dispatch: + workflow_dispatch: jobs: - publish_tool: - - name: Publish Tool - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.7 - with: - versionSpec: '5.x' - - - name: Determine Version - id: version - uses: gittools/actions/gitversion/execute@v0.9.7 - with: - useConfigFile: true - - - name: Setup .NET Core - uses: actions/setup-dotnet@v3 - with: - global-json-file: global.json - - - name: Package - run: dotnet pack --configuration Release --output nuget --nologo -p:Version=${{ steps.version.outputs.nuGetVersionV2 }} - - - name: Tag Repository - uses: rickstaa/action-create-tag@v1 - with: - tag: "v${{ steps.version.outputs.semVer }}" - - - name: Publish - run: dotnet nuget push "**/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }} + publish_tool: + + name: Publish Tool + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v0.9.7 + with: + versionSpec: '5.x' + + - name: Determine Version + id: version + uses: gittools/actions/gitversion/execute@v0.9.7 + with: + useConfigFile: true + + - name: Setup .NET Core + uses: actions/setup-dotnet@v3 + with: + global-json-file: global.json + + - name: Package + run: dotnet pack --configuration Release --output nuget --nologo -p:Version=${{ steps.version.outputs.nuGetVersionV2 }} + + - name: Tag Repository + uses: rickstaa/action-create-tag@v1 + with: + tag: "v${{ steps.version.outputs.semVer }}" + + - name: Publish + run: dotnet nuget push "**/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }} diff --git a/src/ConventionalChangelog/ConventionalChangelog.csproj b/src/ConventionalChangelog/ConventionalChangelog.csproj index 369fb1e..ad14ed7 100644 --- a/src/ConventionalChangelog/ConventionalChangelog.csproj +++ b/src/ConventionalChangelog/ConventionalChangelog.csproj @@ -1,26 +1,26 @@ - - Exe - net7.0;net6.0 + + Exe + net7.0;net6.0 - true - changelog - ./nupkg - LICENSE.md - README.md + true + changelog + ./nupkg + LICENSE.md + README.md - enable - enable - + enable + enable + - - - + + + - - - - + + + + diff --git a/test/ConventionalChangelog.Unit.Tests/ConventionalChangelog.Unit.Tests.csproj b/test/ConventionalChangelog.Unit.Tests/ConventionalChangelog.Unit.Tests.csproj index 99cd82f..94dd61b 100644 --- a/test/ConventionalChangelog.Unit.Tests/ConventionalChangelog.Unit.Tests.csproj +++ b/test/ConventionalChangelog.Unit.Tests/ConventionalChangelog.Unit.Tests.csproj @@ -1,24 +1,24 @@ - - net7.0;net6.0 - enable - false - + + net7.0;net6.0 + enable + false + - - - + + + - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + +