jfmengels / elm-review-simplify

Provides elm-review rules to simplify your Elm code
https://package.elm-lang.org/packages/jfmengels/elm-review-simplify/latest/
BSD 3-Clause "New" or "Revised" License
20 stars 9 forks source link

Limit the number of args to what each check expects #204

Closed jfmengels closed 11 months ago

jfmengels commented 11 months ago

This will help avoid fixes from removing too many arguments which often happens for instance when replacing the entire expression.

I noticed this could be a problem for instance when dealing with List.foldl f initial [] unexpectedArgument which we would fix as initial instead as of initial unexpectedArgument (because the result of the fold function could be a new function).

I'm limiting the number of args each check expects to what the function to check expects.

github-actions[bot] commented 11 months ago

The branch can be tried out by running:

elm-review --template jfmengels/elm-review-simplify/preview