summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/CheckMap.hs10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/CheckMap.hs b/lib/CheckMap.hs
index 3047071..845513d 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)