diff options
author | stuebinm | 2021-09-20 01:56:15 +0200 |
---|---|---|
committer | stuebinm | 2021-09-20 01:58:21 +0200 |
commit | 5b8ed8ad906e92bce5b8576b29ae6f2cc46d8696 (patch) | |
tree | fd942bccad82ee72b9a81d8579da6f197790333c /lib/CheckMap.hs | |
parent | 968038c403e71b98a8f55a4d79e64beca8349ab3 (diff) |
lint map things that aren't custom properties
Diffstat (limited to 'lib/CheckMap.hs')
-rw-r--r-- | lib/CheckMap.hs | 13 |
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 |