-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable funlen for *_test.go files #5
Comments
Hello, When we wish to disable linters in tests we add a rule to issues:
exclude-rules:
- path: _test.go
linters:
- funlen Would this be an acceptable solution? |
This would probably solve the case. Is there option to apply this per func name like |
Sorry for the late reply. I'm not completely sure if there's a pretty way to do that. All I could find is using the source regex, something like this:
This would disable the rule on any line that matches the regex. This would work because the error funlen gives is on the line where the function starts, however it wouldn't work for most other linters. |
Maybe there could be a small hint in the README, with reference to the golangci config |
Fixed in #17 |
Is there any option to disable this linter for all test files?
Often table tests have input tables very long and it is not a problem for reading test function.
The text was updated successfully, but these errors were encountered: