Skip to content

Commit

Permalink
include *_test.go files for lint rules already ignored in test/
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh committed Dec 1, 2023
1 parent 858c9c5 commit 7df8565
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ issues:
text: "use underscores in Go names|receiver name (.+) should be consistent|methods on the same type should have the same receiver name"
- path: 'mock(\w+)/doc.go$'
text: "use underscores in package names|don't use an underscore in package name"
- path: ^test/
- path: (^test/|_test.go$)
linters:
- dogsled
- goconst
- godot
- prealloc
- path: ^test/
- path: (^test/|_test.go$)
text: exported (.+) should have comment( \(or a comment on this block\))? or be unexported
# Need to use the deprecated module "github.com/Azure/azure-sdk-for-go/services" till issue #2670 is addressed.
- linters:
Expand Down
2 changes: 1 addition & 1 deletion internal/test/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

func TestGetFilePathToCAPICRDs(t *testing.T) {
_, filename, _, _ := goruntime.Caller(0) //nolint:dogsled // Ignore "declaration has 3 blank identifiers" check.
_, filename, _, _ := goruntime.Caller(0)
root := path.Join(path.Dir(filename), "..", "..", "..")
g := gomega.NewWithT(t)
g.Expect(getFilePathToCAPICRDs(root)).To(gomega.MatchRegexp(`(.+)/pkg/mod/sigs\.k8s\.io/cluster-api@v(.+)/config/crd/bases`))
Expand Down

0 comments on commit 7df8565

Please sign in to comment.