cekrem/elm-review-positional-arguments/1.1.2

NoTooManyPositionalArguments

Provides a rule to limit the number of positional arguments to functions.

rule : Config -> Rule

Reports functions that have too many positional arguments.

config =
    [ NoTooManyPositionalArguments.rule NoTooManyPositionalArguments.defaults
    ]

When a function has more positional arguments than the configured maximum, the rule reports an error and can auto-fix it by converting to a record parameter. Call sites across the entire project are also updated.

Default configuration: flags functions with more than 4 positional arguments.

Set the maximum number of positional arguments allowed.

config =
    [ NoTooManyPositionalArguments.rule
        (NoTooManyPositionalArguments.withMaxArguments 3)
    ]
type Config

Configuration for the rule.