]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/help/lint/lint.factor
use reject instead of [ ... not ] filter.
[factor.git] / basis / help / lint / lint.factor
index 7112eb5da97443e8d42bcf65b8eba47a27984396..25115905b455af92f7d1850906a5833ca4dad262 100644 (file)
@@ -16,7 +16,7 @@ TUPLE: help-lint-error < source-file-error ;
 
 SYMBOL: +help-lint-failure+
 
-T{ error-type
+T{ error-type-holder
    { type +help-lint-failure+ }
    { word ":lint-failures" }
    { plural "help lint failures" }
@@ -34,7 +34,7 @@ M: help-lint-error error-type drop +help-lint-failure+ ;
 
 PRIVATE>
 
-: help-lint-error ( error topic -- )
+: notify-help-lint-error ( error topic -- )
     lint-failures get pick
     [ [ [ <help-lint-error> ] keep ] dip set-at ] [ delete-at drop ] if
     notify-error-observers ;
@@ -43,7 +43,7 @@ PRIVATE>
 
 :: check-something ( topic quot -- )
     [ quot call( -- ) f ] [ ] recover
-    topic help-lint-error ; inline
+    topic notify-help-lint-error ; inline
 
 : check-word ( word -- )
     [ with-file-vocabs ] vocabs-quot set
@@ -67,8 +67,8 @@ PRIVATE>
     ] check-something ;
 
 : check-about ( vocab -- )
-    vocab-link boa dup
-    '[ _ vocab-help [ article drop ] when* ] check-something ;
+    <vocab-link> dup
+    '[ _ vocab-help [ lookup-article drop ] when* ] check-something ;
 
 : check-vocab ( vocab -- )
     "Checking " write dup write "..." print flush
@@ -92,13 +92,11 @@ PRIVATE>
 
 : :lint-failures ( -- ) lint-failures get values errors. ;
 
-: unlinked-words ( words -- seq )
-    all-word-help [ article-parent not ] filter ;
+: unlinked-words ( vocab -- seq )
+    words all-word-help [ article-parent ] reject ;
 
 : linked-undocumented-words ( -- seq )
     all-words
-    [ word-help not ] filter
+    [ word-help ] reject
     [ article-parent ] filter
-    [ predicate? not ] filter ;
-
-MAIN: help-lint
+    [ predicate? ] reject ;