1{-# OPTIONS_GHC -Wall #-}
2module Reporting.Error.Docs where
4import qualified Reporting.Report as Report
10 | OnlyInExports String
17toReport :: Error -> Report.Report
21 Report.simple "NO MODULE DOCUMENTATION"
22 ( "You must have a documentation comment between the module declaration and the\n"
25 "Learn how at <http://package.elm-lang.org/help/documentation-format>"
28 Report.simple "UNDEFINED DOCUMENTATION"
29 ("Your module documentation includes `" ++ name ++ "` which is not exported.")
30 "Is it misspelled? Should it be exported?"
33 Report.simple "MISSING DOCUMENTATION"
34 ("Your module exports `" ++ name ++ "` but it is not in the module documentation.")
35 ( "It needs to be listed in the module documentation.\n"
36 ++ "Learn how at <http://package.elm-lang.org/help/documentation-format>"
40 Report.simple "MISSING COMMENT"
41 ("The value `" ++ name ++ "` does not have a documentation comment.")
42 ( "Documentation comments start with {-| and end with -}. They should provide a\n"
43 ++ "clear description of how they work, and ideally a small code example. This is\n"
44 ++ "extremely valuable for users checking out your package!\n\n"
45 ++ "If you think the docs are clearer without any words, you can use an empty\n"
46 ++ "comment {-|-} which should be used sparingly. Maybe you have a section of 20\n"
47 ++ "values all with the exact same type. The docs may read better if they are all\n"
48 ++ "described in one place.\n\n"
49 ++ "Learn more at <http://package.elm-lang.org/help/documentation-format>"
53 Report.simple "MISSING ANNOTATION"
54 ("The value `" ++ name ++ "` does not have a type annotation.")
55 ( "Adding type annotations is best practice and it gives you a chance to name\n"
56 ++ "types and type variables so they are as easy as possible to understand!"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list