-
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
Ignore function lines lint #7
Comments
Could you provide an example please? I am having a hard time understanding your issue |
|
especially in |
There are multiple options: This will disable the function is to long warning for funlen in test files exclude-rules:
- path: "_test.go$" # Files that this rule applies to
text: "is too long" # Ignore when the warning includes this text
linters: # All linters that this rule applies to
- funlen You could increase the function length setting and keep the statements setting default... Note that this applies to all files in your project linters-settings:
funlen: # tweak these to your liking
lines: 60
statements: 40 You could //nolint: funlen
func initData() *Data {
return &Data{
... // more than 60 lines
}
} |
Could you add an option to just disable e.g.
|
This could be achieved by using the first example but without the path filter:
I could make a change to accept |
Thanks |
Sometimes we need to init a huge structure which must consume more than 60 lines. It can't be split to multiple function.
The text was updated successfully, but these errors were encountered: