Created
September 22, 2020 12:07
-
-
Save ShrykeWindgrace/6ed0fd9335cfa9e200da68674bedfccb to your computer and use it in GitHub Desktop.
False positive on `NoUnused.CustomTypeConstructorArgs`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (Model, main) -- src/Main.elm | |
import Browser | |
import Html exposing (Html, div, text) | |
import Html.Attributes exposing (id) | |
import Messages exposing (Msg(..)) | |
main : Program () Model Msg | |
main = | |
Browser.document | |
{ init = init | |
, subscriptions = subscriptions | |
, view = view | |
, update = update | |
} | |
type alias Model = | |
{ content : String } | |
defModel : Model | |
defModel = | |
{ content = "" } | |
init : a -> ( Model, Cmd msg ) | |
init _ = | |
( defModel, Cmd.none ) | |
subscriptions : a -> Sub msg | |
subscriptions _ = | |
Sub.none | |
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
Content s -> | |
( { model | content = "content " ++ s }, Cmd.none ) | |
Search string -> | |
( { model | content = "search " ++ string }, Cmd.none ) | |
view : Model -> Browser.Document Msg | |
view model = | |
{ title = "" | |
, body = | |
[ div [] [ text model.content ] | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Messages exposing (Msg(..)) -- src/Messages.elm | |
type Msg | |
= Content String | |
| Search String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ReviewConfig exposing (config) -- review/src/ReviewConfig.elm | |
import NoUnused.CustomTypeConstructorArgs | |
import Review.Rule exposing (Rule) | |
config : List Rule | |
config = | |
[ NoUnused.CustomTypeConstructorArgs.rule | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment