miniBill/elm-review-no-broken-elm-parser-functions

Provides elm-review rules to check for usage of broken elm/parser functions.


Keywords
elm-review
License
BSD-3-Clause
Install
elm-package install miniBill/elm-review-no-broken-elm-parser-functions 1.0.0

Documentation

elm-review-no-broken-elm-parser-functions

Provides elm-review rules to check for usage of Parser.lineComment, Parser.multiComment, Parser.chompUntil and Parser.chompUntilEndOr.

As detailed in the bug report, those functions cause the position to become desynchronized, and should not be used. Use the functions from pithub/elm-parser-bug-workaround instead.

This rule intentionally doesn't provide a fix, because depending on your use case you may want the Before or After versions. Check the linked documentation for picking the correct version.

Provided rules

Configuration

module ReviewConfig exposing (config)

import NoBrokenParserFunctions
import Review.Rule exposing (Rule)

config : List Rule
config =
    [ NoBrokenParserFunctions.rule
    ]

Try it out

You can try the example configuration above out by running the following command:

elm-review --template miniBill/elm-review-no-broken-elm-parser-functions/example

Thanks

Thanks to Ambue for letting me implement this during work hours!