Skip to content
Snippets Groups Projects
Unverified Commit 856a86b8 authored by stuebinm's avatar stuebinm
Browse files

readable prettyprint for inverted lint output

the previous state was a hacky mess
parent 34c19495
Branches
No related tags found
No related merge requests found
......@@ -124,7 +124,8 @@ instance PrettyPrint (Level, MapResult) where
-- TODO: this can be simplified further
prettyLayer :: [Text]
prettyLayer = mapMaybe
(\(_,l) -> Just $ {-prettyprint level <> -}(T.concat $ fmap prettyprint $ fmap getName l))
(\(hint,layer) -> Just $ prettyprint hint
<> "\n (in " <> T.intercalate ", " (fmap getName layer) <> ")\n")
(toList . mapresultLayer $ mapResult)
prettyTileset :: [Text]
prettyTileset = mapMaybe
......
......@@ -79,6 +79,9 @@ instance PrettyPrint Lint where
prettyprint (Offers dep) =
" Info: map offers entrypoint " <> prettyprint dep
instance PrettyPrint Hint where
prettyprint (Hint level msg) = " " <> (showText level) <> ": " <> msg
instance ToJSON Lint where
toJSON (Lint (Hint l m)) = A.object
[ "msg" .= m, "level" .= l ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment