From 8926ff6f420073d4649bc1a7b6a5d90b35e1642b Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sat, 25 Dec 2021 15:07:53 +0100 Subject: the lobby is allowed to contain defunct links --- lib/Properties.hs | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'lib') 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" -- cgit v1.2.3