]> gitweb.factorcode.org Git - factor.git/commitdiff
help.lint.checks: show which strings are problematic
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 18 Aug 2023 02:19:30 +0000 (19:19 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 18 Aug 2023 02:19:30 +0000 (19:19 -0700)
basis/help/lint/checks/checks.factor

index 4097364f31140ad37c48964d9ec2f8604bac42a5..612f7a8100923104025de7874a83fbb6b06c5d19 100644 (file)
@@ -154,8 +154,11 @@ SYMBOL: vocab-articles
     ] bi ;
 
 : check-whitespace ( str1 str2 -- )
-    [ ?last " (" member? ] [ ?first " )." member? ] bi* or
-    [ "Missing whitespace between strings" simple-lint-error ] unless ;
+    2dup [ ?last " (" member? ] [ ?first " ).,;:" member? ] bi* or
+    [ 2drop ] [
+        "Missing whitespace between strings ``%s'' and ``%s''"
+        sprintf simple-lint-error
+    ] if ;
 
 : check-bogus-nl ( element -- )
     { { $nl } { { $nl } } } [ head? ] with any? [