]> gitweb.factorcode.org Git - factor.git/commitdiff
help.lint.checks: factored out to no-ui-disposables word.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 16 Jul 2016 23:28:04 +0000 (16:28 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 16 Jul 2016 23:28:04 +0000 (16:28 -0700)
basis/help/lint/checks/checks.factor

index 684fb2b6103ac27bc0b00bc99850b34ad54ebc35..55a607000ee648d67bd77260e466eeaa1c8bc37f 100644 (file)
@@ -18,6 +18,13 @@ M: simple-lint-error error. summary print ;
 SYMBOL: vocabs-quot
 SYMBOL: vocab-articles
 
+: no-ui-disposables ( seq -- seq' )
+    [
+        class-of name>> {
+            "line" "single-texture" "multi-texture"
+        } member?
+    ] reject ;
+
 : check-example ( element -- )
     [
         '[
@@ -28,11 +35,7 @@ SYMBOL: vocab-articles
             ] keep
             last assert=
         ] vocabs-quot get call( quot -- )
-    ] leaks members [
-        class-of name>> {
-            "line" "single-texture" "multi-texture"
-        } member?
-    ] reject length [
+    ] leaks members no-ui-disposables length [
         "%d disposable(s) leaked in example" sprintf simple-lint-error
     ] unless-zero ;