From 2c3e347fafdbcf5dad6f7805c3826892bf9098a9 Mon Sep 17 00:00:00 2001 From: ramin Date: Thu, 11 Jul 2024 13:54:46 +0100 Subject: [PATCH 1/3] enable revive with export documentation rules check enabled refs #1327 --- .golangci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 6e16c19007..76cfc3da00 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -41,6 +41,7 @@ linters: - protogetter # - scopelint - deprecated since v1.39. exportloopref will be used instead - exportloopref + - revive - staticcheck - stylecheck - typecheck @@ -66,6 +67,9 @@ issues: - lll source: "https://" max-same-issues: 50 + include: + - EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments + - EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments linters-settings: dogsled: @@ -82,3 +86,6 @@ linters-settings: threshold: 200 gofumpt: extra-rules: true + revive: + rules: + - name: exported From f8187c64d341b8da80e7d647ffe280f638cae673 Mon Sep 17 00:00:00 2001 From: ramin Date: Thu, 11 Jul 2024 13:55:04 +0100 Subject: [PATCH 2/3] test branch --- .github/workflows/ci_release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 35c6c65550..ba3bb0f57c 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - fix/ci/revive release: types: [published] pull_request: From b3445b980086ded85ab04333b9a4ac3bdb36fb8e Mon Sep 17 00:00:00 2001 From: ramin Date: Thu, 11 Jul 2024 14:12:45 +0100 Subject: [PATCH 3/3] ignore a few files that don't really need exporting --- header/headertest/testing.go | 1 + nodebuilder/testing.go | 1 + share/eds/cache/noop.go | 1 + 3 files changed, 3 insertions(+) diff --git a/header/headertest/testing.go b/header/headertest/testing.go index 22d8230382..9bb5d057da 100644 --- a/header/headertest/testing.go +++ b/header/headertest/testing.go @@ -1,3 +1,4 @@ +//nolint:revive package headertest import ( diff --git a/nodebuilder/testing.go b/nodebuilder/testing.go index 0f2e046882..7b140cce75 100644 --- a/nodebuilder/testing.go +++ b/nodebuilder/testing.go @@ -1,3 +1,4 @@ +//nolint:revive package nodebuilder import ( diff --git a/share/eds/cache/noop.go b/share/eds/cache/noop.go index 5d7444054e..db82831f9e 100644 --- a/share/eds/cache/noop.go +++ b/share/eds/cache/noop.go @@ -1,3 +1,4 @@ +//nolint:revive package cache import (