Skip to content

Commit 410986e

Browse files
authored
Merge branch 'main' into ARCH-332-part2
2 parents e46970d + 7a06108 commit 410986e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/golangci_lint.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,29 @@ jobs:
4444
version=$(grep '^golangci-lint ' .tool-versions | awk '{print $2}')
4545
echo "version=${version}" | tee -a "$GITHUB_OUTPUT"
4646
47+
- name: Sanitize artifact name
48+
id: artifact-name
49+
env:
50+
MODULE: ${{ matrix.module }}
51+
run: |
52+
safe_name="${MODULE#./}"
53+
safe_name="${safe_name#/}"
54+
safe_name="${safe_name//\//-}"
55+
if [[ -z "$safe_name" || "$safe_name" = "." ]]; then
56+
safe_name="root"
57+
fi
58+
echo "value=golangci-lint-report-${safe_name}" | tee -a "$GITHUB_OUTPUT"
59+
4760
- name: golangci-lint ${{ matrix.module }}
4861
if: ${{ always() && !contains(join(github.event.pull_request.labels.*.name, ' '), 'allow-lint-issues') }}
4962
# NOTE: Keep this version in sync with ACTION_CI_LINT_GO_GIT_TAG in ./script/lint.sh
50-
uses: smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/3.0.0
63+
uses: smartcontractkit/.github/actions/ci-lint-go@ci-lint-go/v4
5164
with:
5265
checkout-repo: false
66+
artifact-name: ${{ steps.artifact-name.outputs.value }}
5367
golangci-lint-version: v${{ steps.get-version.outputs.version }}
5468
go-directory: ${{ matrix.module }}
55-
golangci-lint-args: --output.text.path=stdout --output.checkstyle.path=${{ matrix.module }}/golangci-lint-report.xml
69+
golangci-lint-args: "--output.text.path=stdout --output.checkstyle.path=${{ github.workspace }}/${{ matrix.module }}/golangci-lint-report.xml"
5670

5771
golangci-lint:
5872
# Required sink job that waits for all lint jobs to complete

script/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ -n "${GOLANGCI_LINT_CONFIG:-}" ]]; then
2727
echo "Using user-provided config: $CONFIG_FILE"
2828
else
2929
# NOTE: Keep this version in sync with the action tag in /.github/workflows/golangci_lint.yml
30-
ACTION_CI_LINT_GO_GIT_TAG="${CI_LINT_GO_VERSION:-ci-lint-go/3.0.0}"
30+
ACTION_CI_LINT_GO_GIT_TAG="${CI_LINT_GO_VERSION:-ci-lint-go/v4}"
3131
# Download remote golangci-lint config to gitignored directory
3232
REMOTE_CONFIG_URL="https://raw.githubusercontent.com/smartcontractkit/.github/refs/tags/${ACTION_CI_LINT_GO_GIT_TAG}/actions/ci-lint-go/files/golangci-default.yml"
3333
CONFIG_FILE="$DIRECTORY/golangci.remote.yml"

0 commit comments

Comments
 (0)