Closed elbrujohalcon closed 1 year ago
Credo's default is 8. I don't really see why not have the same default.
8 sounds reasonable as a default. In a team I used to work in we had 7 as a "rule of thumb" 👍 Then you had to use maps or records, or otherwise work around it :) Most of the initial cases it was just people adding options as new arguments :)
8
is a great number, yes!
Max Function Arity
Brief Description
Warn if a function has too many arguments.
Should be on by default?
YES
Options
max_arity :: pos_integer()
(default:5
)Note: I picked
5
as the default basically randomly. If the implementor can do a proper analysis of some public Erlang codebases to determine what a reasonable default should be, much better.Reasoning
Quoting from Credo docs:
Origin (#281)
Inspired by the
Refactor.FunctionArity
rule from Credo