diff options
Diffstat (limited to 'lib/CheckDir.hs')
-rw-r--r-- | lib/CheckDir.hs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/CheckDir.hs b/lib/CheckDir.hs index 3336ff9..8a854e6 100644 --- a/lib/CheckDir.hs +++ b/lib/CheckDir.hs @@ -9,7 +9,6 @@ -- | Module that contains high-level checking for an entire directory module CheckDir (recursiveCheckDir, DirResult(..), resultIsFatal) where -import Badges (badgeJson) import CheckMap (MapResult (..), loadAndLintMap) import Control.Monad (void) import Control.Monad.Extra (mapMaybeM) @@ -17,7 +16,7 @@ import Data.Aeson (ToJSON, (.=)) import qualified Data.Aeson as A import Data.Foldable (fold) import Data.Functor ((<&>)) -import Data.Map (Map, elems, keys, mapWithKey) +import Data.Map (Map, elems, keys) import qualified Data.Map as M import Data.Map.Strict (mapKeys, (\\)) import Data.Maybe (mapMaybe) @@ -95,13 +94,9 @@ instance ToJSON DirResult where ] , "resultText" .= prettyprint (Suggestion, res) , "severity" .= maximumLintLevel res - , "badges" .= annotatedBadges - , "maps" .= M.keys (dirresultMaps res) + , "mapInfo" .= fmap (\tm -> A.object [ "badges" .= mapresultBadges tm ]) + (dirresultMaps res) ] - where annotatedBadges = concat - . M.elems - . mapWithKey (\k -> fmap (badgeJson k) . mapresultBadges) - $ dirresultMaps res instance ToJSON MissingAsset where toJSON (MissingAsset md) = A.object |