Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
walint
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
hub
walint
Commits
1734d1bd
Commit
1734d1bd
authored
3 years ago
by
stuebinm
Browse files
Options
Downloads
Patches
Plain Diff
add lint for empty group layers
parent
858cdc8e
No related branches found
No related tags found
No related merge requests found
Pipeline
#8420
passed
3 years ago
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Properties.hs
+7
-0
7 additions, 0 deletions
lib/Properties.hs
with
7 additions
and
0 deletions
lib/Properties.hs
+
7
−
0
View file @
1734d1bd
...
@@ -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
--
--
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment