[{"name":"Review.Documentation.CodeSnippet","comment":" Checks your small code examples in the readme, module headers and declaration comments\nfor valid syntax, matching types and correctness\nby generating tests from these code snippets.\n\n    import Review.Documentation.CodeSnippet\n\n    config =\n        [ Review.Documentation.CodeSnippet.check\n        ]\n\n@docs check\n\n","unions":[],"aliases":[],"values":[{"name":"check","comment":" [`Rule`](https://dark.elm.dmy.fr/packages/jfmengels/elm-review/latest/Review-Rule#Rule)\nto generate tests from your documentation examples (readme, module header, declaration comment)\nand also to report syntax errors for these code snippets. There are two kinds of checks:\n\n\n### value checks\n\n    module Dict.Extra exposing (keySet)\n\n    {-| `Dict.keys` but returning a `Set` instead of a `List`.\n\n        import Dict\n        import Set\n\n        type Letter\n            = A\n            | B\n            | C\n\n        Dict.fromList [ ( 0, A ), ( 1, B ), ( 2, C ) ]\n            |> keySet\n        --> Set.fromList [ 0, 1, 2 ]\n\n        -- or\n        Dict.fromList [ ( 0, A ), ( 1, B ), ( 2, C ) ]\n            |> keySet\n        -->\n        Set.fromList\n            [ 0\n            , 1\n            , 2\n            ]\n\n        -- or\n        Dict.fromList [ ( 0, A ), ( 1, B ), ( 2, C ) ]\n            |> keySet\n        --> Set.fromList\n        -->     [ 0\n        -->     , 1\n        -->     , 2\n        -->     ]\n\n    -}\n    keySet = ...\n\nThis verifies that the actual value of the expression before `-->` is the same as the expected value after `-->`.\n\n\n### type checks\n\n    module Codec exposing (Codec, record, field, recordFinish, signedInt)\n\n    {-| Start creating a codec for a record.\n\n        type alias Point =\n            { x : Int, y : Int }\n\n        Codec.record (\\x y -> { x = x, y = y })\n            |> Codec.field .x Codec.signedInt\n            |> Codec.field .y Codec.signedInt\n            |> Codec.recordFinish\n        --: Codec Point\n    -}\n    record = ...\n\n**important** The rule will only report syntax and type errors\nif your code snippet contains at least one of these two checks, so replace\n\n    {-| ...\n\n        myResult : Cmd Int\n        myResult =\n            Ok 3 |> Cmd.Extra.fromResult\n\n    -}\n\nwith\n\n    {-| ...\n\n        Ok 3 |> Cmd.Extra.fromResult\n        --: Cmd Int\n\n    -}\n\nBoth checks will be run on _all modules_ and the readme. If you want to disable this for e.g. generated or vendored code,\nuse [`Review.Rule.ignoreErrorsForDirectories`](https://dark.elm.dmy.fr/packages/jfmengels/elm-review/latest/Review-Rule#ignoreErrorsForDirectories)\n\n","type":"Review.Rule.Rule"}],"binops":[]}]