From 6c1c7e17fe4a71b293ef75ad9adb43fffd9632e1 Mon Sep 17 00:00:00 2001 From: Shawn Tabai Date: Thu, 10 Mar 2022 18:00:08 -0800 Subject: [PATCH 1/3] feat: reenable super linter with fixes --- .github/workflows/lint.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8cc45c6..e5525f4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,6 +25,11 @@ jobs: - name: Generate protos run: nix-shell --run "buf generate" + - uses: github/super-linter/slim@a1e55fad905ce8f35ef9f46a400c7de0bc62d194 + env: + VALIDATE_ALL_CODEBASE: ${{ !inputs.changed_files_only }} + DEFAULT_BRANCH: main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Lint Code run: | if [[ "${{ inputs.changed_files_only }}" == "true" ]]; then From afbe93782ef65f6e74a0fa921f5b490222b1af8b Mon Sep 17 00:00:00 2001 From: Shawn Tabai Date: Thu, 10 Mar 2022 18:08:03 -0800 Subject: [PATCH 2/3] fix: clean up lint action errors --- .github/workflows/lint.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e5525f4..689bbb7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,12 +6,13 @@ on: workflow_call: inputs: changed_files_only: + description: Whether to limit to files modified in the current change type: boolean default: false required: false jobs: - golangci-lint: + super-linter: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -25,14 +26,9 @@ jobs: - name: Generate protos run: nix-shell --run "buf generate" - - uses: github/super-linter/slim@a1e55fad905ce8f35ef9f46a400c7de0bc62d194 + - name: Lint Code + uses: github/super-linter/slim@a1e55fad905ce8f35ef9f46a400c7de0bc62d194 env: VALIDATE_ALL_CODEBASE: ${{ !inputs.changed_files_only }} DEFAULT_BRANCH: main GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Lint Code - run: | - if [[ "${{ inputs.changed_files_only }}" == "true" ]]; then - rev_flag="--new-from-rev=HEAD~" - fi - nix-shell --run "golangci-lint run --config .github/linters/.golangci.yml $rev_flag" From 65a968da33a2bb98bcb00fbf7a25039b2c567f21 Mon Sep 17 00:00:00 2001 From: Shawn Tabai Date: Thu, 10 Mar 2022 18:19:37 -0800 Subject: [PATCH 3/3] fix: switch super-linter to main branch --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 689bbb7..134775c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -27,7 +27,7 @@ jobs: run: nix-shell --run "buf generate" - name: Lint Code - uses: github/super-linter/slim@a1e55fad905ce8f35ef9f46a400c7de0bc62d194 + uses: github/super-linter/slim@main env: VALIDATE_ALL_CODEBASE: ${{ !inputs.changed_files_only }} DEFAULT_BRANCH: main