From 46410e2aa25c8ac9347f9cf1f7d231f8c4f4fe88 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 12 Feb 2024 12:14:23 +0100 Subject: [PATCH] lint: Ignore 'dotfiles' warnings in test/ This allows to keep using ``` import ( . "github.com/onsi/gomega" . "github.com/onsi/ginkgo/v2" ) ``` Unfortunately this also allows to use ``` import . "fmt" ``` I haven't been able to make the ignore rule more fine-grained. I don't expect this will happen though. Allowing to use non-namespaced `gomega` and `ginkgo` API calls should make writing tests more convenient/more readable. --- .golangci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 895990ee1a..2beb91b024 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -14,3 +14,10 @@ linters: - unused - misspell - revive + +issues: + exclude-rules: + - path: 'test/*' + text: 'dot-imports: should not use dot imports' + linters: + - revive