From ab10ce628cfe02e4208e95ba52138e2cf147b21d Mon Sep 17 00:00:00 2001 From: Nick DeLuca Date: Wed, 7 Aug 2024 13:25:18 -0700 Subject: [PATCH] chore(lint): Disable funlen for test functions (#1993) This adds a regular expression that matches `func Test...` or `func (suite *Suite) Test...` style functions and disables the length check. An example from e2e tests that failed lint: `func (suite *IntegrationTestSuite) TestEip712BasicMessageAuthorization()` --- .golangci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 53b29e6b9..f4f247cd0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -81,6 +81,13 @@ linters: # - whitespace - wrapcheck +issues: + exclude-rules: + # Disable funlen for "func Test..." or func (suite *Suite) Test..." type functions + # These functions tend to be descriptive and exceed length limits. + - source: "^func (\\(.*\\) )?Test" + linters: + - funlen linters-settings: errcheck: