From 151b622cefbf26d6b9d21a69ee7c109d72aef7cf Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 29 Mar 2024 19:48:15 +0000 Subject: [PATCH] rename golangci-lint config file and use golangci-lint-action to lint Signed-off-by: Matthieu MOREL --- .github/workflows/pr-linter-check.yml | 13 +++++++------ .golangci.yaml | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-linter-check.yml b/.github/workflows/pr-linter-check.yml index 36badcaa14..b906608321 100644 --- a/.github/workflows/pr-linter-check.yml +++ b/.github/workflows/pr-linter-check.yml @@ -7,16 +7,17 @@ jobs: runs-on: ubuntu-latest steps: + - name: Check out the code + uses: actions/checkout@v4 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.22' - - - name: Check out the code - uses: actions/checkout@v4 + go-version-file: 'go.mod' + cache: false - - name: golangci-lint + - name: Linter check uses: golangci/golangci-lint-action@v4 with: version: v1.57.2 - args: --out-format=colored-line-number + args: --verbose --out-format=colored-line-number diff --git a/.golangci.yaml b/.golangci.yaml index 3f7e0c11f5..cb24ff594e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -250,6 +250,7 @@ linters-settings: enable: - empty - len + - nil-compare testpackage: # regexp pattern to skip files skip-regexp: (export|internal)_test\.go