From a9dffc62a5a5dad475089d5963073a683348cef0 Mon Sep 17 00:00:00 2001 From: Quentin Mc Gaw Date: Tue, 4 Feb 2025 16:00:26 +0100 Subject: [PATCH] chore(ci): linting job steps changes - golangci-lint runs as configured in .golangci.yml - goheader runs separately on new issues only --- .github/workflows/golangci-lint.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index e1f4e8b074c..fc1968ed487 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,13 +22,17 @@ jobs: - uses: actions/setup-go@v5 with: go-version: stable - - name: golangci-lint + - name: goheader + # The goheader linter is only enabled in the CI so that it runs only on modified or new files + # (see only-new-issues: true). It is disabled in .golangci.yml because + # golangci-lint running locally is not aware of new/modified files compared to the base + # commit of a pull request, and we want to avoid reporting invalid goheader errors. uses: golangci/golangci-lint-action@v6 with: version: v1.60 only-new-issues: true - # The goheader linter is enabled so that it runs only on modified or new files - # (see only-new-issues: true). Note it is disabled in .golangci.yml because - # golangci-lint is not aware of new/modified files compared to the last git commit, - # and we want to avoid reporting invalid goheader errors when running the linter locally. - args: --enable goheader + args: --enable-only goheader + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.60