[{"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, checkImplicitlyImportingEverythingFromCurrentModule\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            |> Dict.Extra.keySet\n        --> Set.fromList [ 0, 1, 2 ]\n\n        -- or\n        Dict.fromList [ ( 0, A ), ( 1, B ), ( 2, C ) ]\n            |> Dict.Extra.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            |> Dict.Extra.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        import Codec exposing (Codec)\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\nNote that because you use the type `Codec` _unqualified_ in your check,\nyou have to _explicitly import_ it.\n(This is different from [`elm-verify-examples`](https://github.com/stoeffel/elm-verify-examples)\nwhich implicitly exposes all local module members.\nIn case you want to simulate that behaviour for legacy reasons, use [`checkImplicitlyImportingEverythingFromCurrentModule`](#checkImplicitlyImportingEverythingFromCurrentModule))\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"},{"name":"checkImplicitlyImportingEverythingFromCurrentModule","comment":" A version of [`check`](#check)\nprimarily intended to offer compatibility with [`elm-verify-examples`](https://github.com/stoeffel/elm-verify-examples)\nfor legacy codebases.\n\nIt will implicitly interpret\n\n    module CurrentModule exposing (doSomething)\n\n    {-| Does something\n\n        doSomething --> \"something was done\"\n\n    -}\n    doSomething\n\nas\n\n    module CurrentModule exposing (doSomething)\n\n    {-| Does something\n\n        import CurrentModule exposing (..)\n\n        doSomething --> \"something was done\"\n\n    -}\n    doSomething\n\nHistory: This was the previous behaviour of the rule in version 1.\n[Shadowing issues](https://github.com/lue-bird/elm-review-documentation-code-snippet/issues/2)\ninitiated the search for better alternatives.\nRequiring explicit imports for exposing members of the current module turned out to\nmake the snippets easier to understand, easier to copy into your code\nand less error prone.\nSee above linked issue to see considered alternatives or suggest one yourself.\n\n","type":"Review.Rule.Rule"}],"binops":[]}]