From d7b8a203ea120acd98ac70b5b270f8d37baa0672 Mon Sep 17 00:00:00 2001 From: XmasApple Date: Mon, 13 Nov 2023 15:42:27 +0300 Subject: [PATCH] Add linter for examples --- .github/workflows/lint.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7f192afd..09c25661 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,6 +8,14 @@ on: jobs: autoformatter: + strategy: + matrix: + source-dir: ["./src/", "./examples/src/"] + include: + - source-dir: "./src/" + solutionFile: "YdbSdk.sln" + - source-dir: "./slo/src/" + solutionFile: "YdbExamples.sln" name: autoformat check concurrency: group: lint-autoformat-${{ github.ref }} @@ -21,15 +29,18 @@ jobs: with: dotnet-version: '6.0.x' - name: Restore - run: dotnet restore ./src/YdbSdk.sln + run: dotnet restore ${{ matrix.source-dir }}${{ matrix.solutionFile }} - name: Install ReSharper run: dotnet tool install -g JetBrains.ReSharper.GlobalTools --version 2023.2.1 - name: format all files with auto-formatter - run: bash ./.github/scripts/format-all-dotnet-code.sh ./src/ YdbSdk.sln "Custom Cleanup" + run: bash ./.github/scripts/format-all-dotnet-code.sh ./src/ ${{ matrix.source-dir }} ${{ matrix.solutionFile }} "Custom Cleanup" - name: Check repository diff run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken" inspection: + strategy: + matrix: + solutionPath: ["./src/YdbSdk.sln", "./examples/src/YdbExamples.sln"] runs-on: ubuntu-latest name: Inspection steps: @@ -40,11 +51,11 @@ jobs: with: dotnet-version: '6.0.x' - name: Restore - run: dotnet restore ./src/YdbSdk.sln + run: dotnet restore ${{ matrix.solutionPath }} - name: Inspect code uses: muno92/resharper_inspectcode@v1 with: - solutionPath: ./src/YdbSdk.sln + solutionPath: ${{ matrix.solutionPath }} version: 2023.2.1 include: | **.cs