[{"name":"MultipleAppendToConcat","comment":" Rule: Replace multiple `++` in sequence with concat.\n\n@docs rule, ListSupplyStyle\n\n","unions":[{"name":"ListSupplyStyle","comment":" In what style will `[ ... ]` be supplied to `List.concat`?\n\n  - `ApplyList`: `List.concat [ ... ]`\n  - `PipeRightList`: `[ ... ] |> List.concat`\n  - `PipeLeftList`: `List.concat <| [ ... ]`\n\n","args":[],"cases":[["ApplyList",[]],["PipeRightList",[]],["PipeLeftList",[]]]}],"aliases":[],"values":[{"name":"rule","comment":" Replaces multiple `++` in sequence with concat in a given [`ListSupplyStyle`](#ListSupplyStyle).\n\nFor example, running `MultipleAppendToConcat.rule MultipleAppendToConcat.ApplyList` on\n\n    combinedString =\n        \"Your name is \"\n            ++ (nameParts\n                    |> String.join \" \"\n               )\n            ++ \" and your age is \"\n            ++ (age |> String.fromInt)\n            ++ \".\"\n\nis fixed to\n\n    combinedString =\n        String.concat\n            [ \"Your name is \"\n            , nameParts\n                |> String.join \" \"\n            , \" and your age is \"\n            , age |> String.fromInt\n            , \".\"\n            ]\n\nand for lists\n\n    combinedList =\n        a\n            ++ [ b, c ]\n            ++ d\n\nfixed to\n\n    combinedList =\n        List.concat\n            [ a\n            , [ b, c ]\n            , d\n            ]\n\n`elm-review` doesn't have type inference, so for values like `a ++ b ++ c` this rule doesn't provide a fix.\n\nRead the [readme for why you would (not) want to enable this rule](https://package.elm-lang.org/packages/lue-bird/elm-review-multiple-append-to-concat/1.0.0#why).\n\nAlso don't be surprised when fixes look cursed. The fix keeps all appended operands in their original place. No extra aligning and indentation.\nThis is necessary because\n\n  - changing indentation messes up multi-line strings\n  - `case..of` cases and `let` declarations are indentation sensitive, so adding for example a comma in front of the first line can lead to compiler errors\n\n[`elm-format`](https://github.com/avh4/elm-format) will safely prettify it anyway\n\n","type":"MultipleAppendToConcat.ListSupplyStyle -> Review.Rule.Rule"}],"binops":[]}]