diff --git a/lib/CheckMap.hs b/lib/CheckMap.hs index 30470719708e46afed591c76eef2ea639f76ca6e..845513d9512155c5d5e457026941b2d01071fc5c 100644 --- a/lib/CheckMap.hs +++ b/lib/CheckMap.hs @@ -39,9 +39,9 @@ import Util (PrettyPrint (prettyprint), prettyprint) data MapResult = MapResult { mapresultLayer :: Map Hint [Layer] , mapresultTileset :: Map Hint [Tileset] --Map Text (LintResult Tileset) - , mapresultGeneral :: [Lint] , mapresultDepends :: [Dep] , mapresultProvides :: [Text] + , mapresultGeneral :: [Lint] } deriving (Generic) instance ToJSON MapResult where @@ -67,16 +67,10 @@ instance ToJSON CollectedLints where -- layers upwards in the file hierarchy loadAndLintMap :: FilePath -> Int -> IO (Maybe MapResult) loadAndLintMap path depth = loadTiledmap path >>= pure . \case - DecodeErr err -> Just $ MapResult - { mapresultLayer = mempty - , mapresultTileset = mempty - , mapresultDepends = [] - , mapresultProvides = [] - , mapresultGeneral = + DecodeErr err -> Just $ MapResult mempty mempty mempty mempty [ hint Fatal . T.pack $ path <> ": Fatal: " <> err ] - } IOErr _ -> Nothing Loaded waMap -> Just (runLinter waMap depth)