diff options
-rw-r--r-- | lib/CheckMap.hs | 3 | ||||
-rw-r--r-- | lib/Types.hs | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/CheckMap.hs b/lib/CheckMap.hs index 93c8696..484fe83 100644 --- a/lib/CheckMap.hs +++ b/lib/CheckMap.hs @@ -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 diff --git a/lib/Types.hs b/lib/Types.hs index ab9f8a2..00f0ee7 100644 --- a/lib/Types.hs +++ b/lib/Types.hs @@ -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 ] |