Skip to content
Snippets Groups Projects
Commit 1734d1bd authored by stuebinm's avatar stuebinm
Browse files

add lint for empty group layers

parent 858cdc8e
No related branches found
No related tags found
No related merge requests found
Pipeline #8420 passed
...@@ -118,9 +118,16 @@ checkLayer = do ...@@ -118,9 +118,16 @@ checkLayer = do
case layerType layer of case layerType layer of
"tilelayer" -> mapM_ checkLayerProperty (getProperties layer) "tilelayer" -> mapM_ checkLayerProperty (getProperties layer)
"group" -> pure ()
ty -> unless (layerName layer == "floorLayer" && ty == "objectgroup") ty -> unless (layerName layer == "floorLayer" && ty == "objectgroup")
$ complain "only tilelayer are supported." $ complain "only tilelayer are supported."
if layerType layer == "group"
then when (null (layerLayers layer))
$ warn "Empty group layers are pointless."
else when (isJust (layerLayers layer))
$ complain "Layer is not of type \"group\", but has sublayers."
-- | Checks a single (custom) property of a layer -- | Checks a single (custom) property of a layer
-- --
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment