]> gitweb.factorcode.org Git - factor.git/commitdiff
help.lint: use vocab-exists? and eliminate UI disposables from check.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 16 Jul 2016 23:22:06 +0000 (16:22 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 16 Jul 2016 23:22:06 +0000 (16:22 -0700)
basis/help/lint/checks/checks.factor
basis/help/lint/lint.factor

index a181a5da837cf69e9ed97b38b14ea69988488fae..684fb2b6103ac27bc0b00bc99850b34ad54ebc35 100644 (file)
@@ -16,7 +16,6 @@ M: simple-lint-error summary message>> ;
 M: simple-lint-error error. summary print ;
 
 SYMBOL: vocabs-quot
-SYMBOL: all-vocabs-list
 SYMBOL: vocab-articles
 
 : check-example ( element -- )
@@ -29,7 +28,11 @@ SYMBOL: vocab-articles
             ] keep
             last assert=
         ] vocabs-quot get call( quot -- )
-    ] leaks members length [
+    ] leaks members [
+        class-of name>> {
+            "line" "single-texture" "multi-texture"
+        } member?
+    ] reject length [
         "%d disposable(s) leaked in example" sprintf simple-lint-error
     ] unless-zero ;
 
@@ -109,9 +112,6 @@ SYMBOL: vocab-articles
     \ $see-also swap elements [ rest all-unique? ] all?
     [ "$see-also are not unique" simple-lint-error ] unless ;
 
-: vocab-exists? ( name -- ? )
-    [ lookup-vocab ] [ all-vocabs-list get member? ] bi or ;
-
 : check-modules ( element -- )
     \ $vocab-link swap elements [
         second
index 5f506c9cfbc62d3afabd19168f7a3582f82e478e..66988df5aabee2d07932df9d43b338d3abd1eaef 100644 (file)
@@ -80,7 +80,6 @@ PRIVATE>
 : help-lint ( prefix -- )
     [
         auto-use? off
-        all-disk-vocab-names all-vocabs-list set
         group-articles vocab-articles set
         loaded-child-vocab-names
         [ check-vocab ] each