summaryrefslogtreecommitdiff
path: root/lib/CheckMap.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CheckMap.hs')
-rw-r--r--lib/CheckMap.hs13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/CheckMap.hs b/lib/CheckMap.hs
index 08932b4..ffd94ec 100644
--- a/lib/CheckMap.hs
+++ b/lib/CheckMap.hs
@@ -17,12 +17,10 @@ import qualified Data.Vector as V
import GHC.Generics (Generic)
import LintWriter (LintResult (..), LintWriter,
- lintsToDeps, resultToLints,
- runLintWriter)
-import Properties (checkLayerProperty,
- checkMapProperty)
+ lintsToDeps, runLintWriter)
+import Properties (checkLayerProperty, checkMap)
import Tiled2 (Layer (layerName, layerProperties),
- Tiledmap (tiledmapLayers, tiledmapProperties),
+ Tiledmap (tiledmapLayers),
loadTiledmap)
import Types (Dep, Level (..), Lint (..), hint,
lintLevel)
@@ -57,7 +55,7 @@ loadAndLintMap path = loadTiledmap path >>= pure . \case
runLinter :: Tiledmap -> MapResult ()
runLinter tiledmap = MapResult
{ mapresultLayer = Just layerMap
- , mapresultGeneral = propertyLints -- no general lints for now
+ , mapresultGeneral = generalLints -- no general lints for now
, mapresultDepends = concatMap (lintsToDeps . snd) layer
}
where
@@ -67,8 +65,7 @@ runLinter tiledmap = MapResult
where runCheck l = (layerName l, LintResult $ runWriterT (checkLayer l))
-- lints collected from properties
- propertyLints = runLintWriter
- $ mapM_ (checkMapProperty tiledmap) (tiledmapProperties tiledmap)
+ generalLints = runLintWriter (checkMap tiledmap)
-- | collect lints on a single map layer