summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstuebinm2021-12-25 15:07:53 +0100
committerstuebinm2021-12-25 15:07:53 +0100
commit8926ff6f420073d4649bc1a7b6a5d90b35e1642b (patch)
treec61c1a6f11da4a9bb5fa4a200b99d0fe54c89a2d /lib
parente63907715ef788b256e0a6cedbda31648b0a71c2 (diff)
the lobby is allowed to contain defunct links
Diffstat (limited to '')
-rw-r--r--lib/Properties.hs27
1 files changed, 15 insertions, 12 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 51fa567..341426d 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -702,18 +702,21 @@ unwrapURI sym p@(Property name _) f g = unwrapString p $ \link -> do
setProperty name uri
f uri
Left NotALink -> unwrapPath link g
- Left err -> complain $ case err of
- IsBlocked -> link <> " is a blocked site."
- DomainDoesNotExist domain -> "The domain " <> domain <> " does not exist; \
- \please make sure it is spelled correctly."
- SchemaDoesNotExist schema ->
- "the URI schema " <> schema <> ":// cannot be used."
- WrongScope schema allowed ->
- "the URI schema " <> schema <> ":// cannot be used in property \
- \\"" <> name <> "\"; allowed "
- <> (if length allowed == 1 then "is " else "are ")
- <> intercalate ", " (fmap (<> "://") allowed) <> "."
- VarsDisallowed -> "extended API links are disallowed in links"
+ Left err -> do
+ isLobby <- lintConfig configAssemblyTag <&> (== "lobby")
+
+ (if isLobby then warn else complain) $ case err of
+ IsBlocked -> link <> " is a blocked site."
+ DomainDoesNotExist domain -> "The domain " <> domain <> " does not exist; \
+ \please make sure it is spelled correctly."
+ SchemaDoesNotExist schema ->
+ "the URI schema " <> schema <> ":// cannot be used."
+ WrongScope schema allowed ->
+ "the URI schema " <> schema <> ":// cannot be used in property \
+ \\"" <> name <> "\"; allowed "
+ <> (if length allowed == 1 then "is " else "are ")
+ <> intercalate ", " (fmap (<> "://") allowed) <> "."
+ VarsDisallowed -> "extended API links are disallowed in links"