Unfortunately I cannot get this review rule working. It always results in "I found no errors!". Here's my example code:
module Main exposing (Model, main)
import Browser
import Html exposing (Html, div, text)
type alias Model =
{ x : Int
}
main : Program () Model Msg
main =
Browser.sandbox { init = { x = 0 }, update = update, view = view }
type Msg
= Increment
| Decrement
update : Msg -> Model -> Model
update msg model =
case msg of
Increment ->
{ model | x = model.x + 1 }
Decrement ->
{ model | x = model.x - 1 }
view : Model -> Html Msg
view model =
div []
[ text <| String.fromInt model.x
]
module ReviewConfig exposing (config)
import RecordFieldHelper.GenerateUsed
import Review.Rule as Rule exposing (Rule)
config : List Rule
config =
[ RecordFieldHelper.GenerateUsed.rule
{ generator = RecordFieldHelper.GenerateUsed.accessors
, generateIn = ( "Lense", [] )
}
]