-
Notifications
You must be signed in to change notification settings - Fork 57
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
Make it so that the max_function_length style checker can ignore func… #62
Conversation
xref failed with exit status: 1 |
@@ -517,22 +517,25 @@ max_module_length(Config, Target, RuleConfig) -> | |||
[] | |||
end. | |||
|
|||
-type max_function_length_config() :: #{ignore_functions => [function_spec()] | |||
max_length => non_neg_integer()}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Xref:
syntax error before: max_length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing a comma here
-spec max_function_length(elvis_config:config(), | ||
elvis_file:file(), | ||
empty_rule_config()) -> | ||
max_function_length_config()) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to Xref:
type max_function_length_config() undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, @sargun! Would you mind adding tests for this?
@@ -517,22 +517,25 @@ max_module_length(Config, Target, RuleConfig) -> | |||
[] | |||
end. | |||
|
|||
-type max_function_length_config() :: #{ignore_functions => [function_spec()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To preserve module style, you should define this type above, close to the other types defined in the module
Any idea why common test is throwing the following:
|
Fixed. |
…tions