From 350aee4f18b21a190bde0561dcee2a3b0573e062 Mon Sep 17 00:00:00 2001 From: Ahmed Samir Date: Sun, 8 Oct 2023 16:58:02 +0300 Subject: [PATCH 1/6] fix: enable golangci-lint Signed-off-by: Ahmed Samir --- .github/workflows/build_test_pr.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index e17d73ae1..e1ac32119 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -38,11 +38,13 @@ jobs: go-version: 1.21 # FIXME: https://github.com/golangci/golangci-lint-action/issues/677 - # - name: golangci-lint - # uses: golangci/golangci-lint-action@v3 - # with: - # skip-pkg-cache: true - + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + skip-pkg-cache: true + args: --verbose --timeout=10m + - name: Install dependencies run: go mod download From 9a18f0829fc2fe98b0025f44bbe2bf1d8eed6d7f Mon Sep 17 00:00:00 2001 From: Ahmed Samir Date: Sun, 8 Oct 2023 17:24:22 +0300 Subject: [PATCH 2/6] fix: disable cache in golangci-lint Signed-off-by: Ahmed Samir --- .github/workflows/build_test_pr.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index e1ac32119..9653d5c58 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -42,9 +42,10 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: latest + cache: false skip-pkg-cache: true - args: --verbose --timeout=10m - + args: --verbose --timeout=2m + - name: Install dependencies run: go mod download From 39fefe3d30b87e41900319d26d0e0a2427cb19ef Mon Sep 17 00:00:00 2001 From: Ahmed Samir Date: Sun, 8 Oct 2023 17:26:55 +0300 Subject: [PATCH 3/6] fix: add skip-cache flag Signed-off-by: Ahmed Samir --- .github/workflows/build_test_pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index 9653d5c58..fd8a85306 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -42,9 +42,9 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: latest - cache: false + skip-cache: true skip-pkg-cache: true - args: --verbose --timeout=2m + args: --verbose --timeout=3m - name: Install dependencies run: go mod download From cee6ab800b5a3faf48e67f5452e564def40b789c Mon Sep 17 00:00:00 2001 From: Ahmed Samir Date: Sun, 8 Oct 2023 17:34:27 +0300 Subject: [PATCH 4/6] fix: try go-linter Signed-off-by: Ahmed Samir --- .github/workflows/build_test_pr.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index fd8a85306..f62c8a6e9 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -38,13 +38,10 @@ jobs: go-version: 1.21 # FIXME: https://github.com/golangci/golangci-lint-action/issues/677 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + - name: golint + uses: Jerome1337/golint-action@v1.0.2 with: - version: latest - skip-cache: true - skip-pkg-cache: true - args: --verbose --timeout=3m + golint-path: './'' - name: Install dependencies run: go mod download From 4490a34fd1fe7a72be465f8a43c95f2e2accd7c4 Mon Sep 17 00:00:00 2001 From: Ahmed Samir Date: Sun, 8 Oct 2023 17:35:04 +0300 Subject: [PATCH 5/6] fix: try go-linter Signed-off-by: Ahmed Samir --- .github/workflows/build_test_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index f62c8a6e9..f071d0673 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -41,7 +41,7 @@ jobs: - name: golint uses: Jerome1337/golint-action@v1.0.2 with: - golint-path: './'' + golint-path: './' - name: Install dependencies run: go mod download From 86b00afeff6e8c883be76b7ce73bc5831cd598a9 Mon Sep 17 00:00:00 2001 From: Ahmed Samir Date: Sun, 8 Oct 2023 17:38:06 +0300 Subject: [PATCH 6/6] fix: include all subdirs in linting Signed-off-by: Ahmed Samir --- .github/workflows/build_test_pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_test_pr.yml b/.github/workflows/build_test_pr.yml index f071d0673..eb09381ae 100644 --- a/.github/workflows/build_test_pr.yml +++ b/.github/workflows/build_test_pr.yml @@ -41,7 +41,7 @@ jobs: - name: golint uses: Jerome1337/golint-action@v1.0.2 with: - golint-path: './' + golint-path: './...' - name: Install dependencies run: go mod download