dart-code-metrics
dart-code-metrics copied to clipboard
[Rule change] long-parameters-list - ignore optional prameters
Its normal to have 5+ parameters in flutter if only 1..3 required. For example:
Typical API request - only 3 parameters required, but we need to have ability to customize some parameters sometimes.
I think this rule created for avoiding functionCall(p1, p1, p3...., p5)
but it is not my case.
Without this rule change our team can't use it.
P.S.: especially dart analysis message sounds like info: Long Parameter List. This method require 5 arguments.
@NaikSoftware I totally disagree change default behaviour, but we can discuss about add anti-pattern option for skip optional arguments.
@dkrutskikh warning message say: 'require 5 parameters' but really require only 3.
@NaikSoftware do you mean we need only to change message?
@dkrutskikh personally I need setting to ignore optional params in this rule
Closing as duplicate of #420