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
62916338
Commit
62916338
authored
3 years ago
by
stuebinm
Browse files
Options
Downloads
Patches
Plain Diff
little code cleanup
parent
652c2030
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/CheckMap.hs
+5
-7
5 additions, 7 deletions
lib/CheckMap.hs
lib/Properties.hs
+1
-1
1 addition, 1 deletion
lib/Properties.hs
with
6 additions
and
8 deletions
lib/CheckMap.hs
+
5
−
7
View file @
62916338
...
...
@@ -89,7 +89,7 @@ runLinter :: Tiledmap -> Int -> MapResult
runLinter
tiledmap
depth
=
MapResult
{
mapresultLayer
=
invertThing
layer
,
mapresultTileset
=
invertThing
tileset
,
mapresultGeneral
=
general
Lints
,
mapresultGeneral
=
resultToLints
general
Result
,
mapresultDepends
=
mapMaybe
lintToDep
generalLints
<>
concatMap
resultToDeps
layer
<>
concatMap
resultToDeps
tileset
...
...
@@ -99,6 +99,7 @@ runLinter tiledmap depth = MapResult
where
layer
=
checkThing
tiledmapLayers
checkLayer
tileset
=
checkThing
tiledmapTilesets
checkTileset
generalResult
=
runLintWriter
tiledmap
depth
checkMap
checkThing
getter
checker
=
V
.
toList
.
V
.
map
runCheck
$
getter
tiledmap
where
runCheck
thing
=
runLintWriter
thing
depth
checker
...
...
@@ -106,15 +107,12 @@ runLinter tiledmap depth = MapResult
-- | "inverts" a LintResult, i.e. groups it by lints instead of
-- layers / maps
invertThing
thing
=
M
.
unionsWith
(
<>
)
$
fmap
invertLintResult
thing
-- lints collected from properties
generalLints
=
resultToLints
generalResult
generalResult
=
runLintWriter
tiledmap
depth
checkMap
adjustedMap
=
(
resultToAdjusted
generalResult
)
{
tiledmapLayers
=
V
.
fromList
.
fmap
resultToAdjusted
$
layer
}
-- TODO: this appears to have reordered map layers???
{
tiledmapLayers
=
V
.
fromList
.
fmap
resultToAdjusted
$
layer
,
tiledmapTilesets
=
V
.
fromList
.
fmap
resultToAdjusted
$
tileset
}
-- human-readable lint output, e.g. for consoles
instance
PrettyPrint
(
Level
,
MapResult
)
where
...
...
This diff is collapsed.
Click to expand it.
lib/Properties.hs
+
1
−
1
View file @
62916338
...
...
@@ -98,7 +98,6 @@ checkLayer :: LintWriter Layer
checkLayer
=
do
layer
<-
askContext
mapM_
checkLayerProperty
(
getProperties
layer
)
setProperty
"jitsiRoomAdminTag"
"Hello, World"
...
...
@@ -109,6 +108,7 @@ checkLayer = do
checkLayerProperty
::
Property
->
LintWriter
Layer
checkLayerProperty
p
@
(
Property
name
_value
)
=
case
name
of
"jitsiRoom"
->
do
setProperty
"jitsiRoomAdminTag"
"Hello, World"
uselessEmptyLayer
unwrapString
p
$
\
_val
->
do
suggestProperty
$
Property
"jitsiTrigger"
(
StrProp
"onaction"
)
...
...
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