]> gitweb.factorcode.org Git - factor.git/commitdiff
help.lint: simplify by adding help-lint-root
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 21 Jan 2023 00:01:09 +0000 (16:01 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 21 Jan 2023 00:01:09 +0000 (16:01 -0800)
basis/help/lint/lint.factor

index 73e2cd3fe46d2bb8109a95d71d2fd49851ea5d1a..8ae705b222ecc7687bd9e385c77093b62a33dd55 100644 (file)
@@ -87,6 +87,9 @@ PRIVATE>
 : help-lint ( prefix -- )
     loaded-child-vocab-names help-lint-vocabs ;
 
+: help-lint-root ( root -- )
+    "" vocabs-to-load help-lint-vocabs ;
+
 : help-lint-all ( -- ) "" help-lint ;
 
 : :lint-failures ( -- ) lint-failures get values errors. ;
@@ -103,10 +106,10 @@ PRIVATE>
 : test-lint-main ( -- )
     command-line get [
         dup vocab-roots get member? [
-            "" vocabs-to-load [ require-all ] keep
+            [ load-root ] [ help-lint-root ] bi
         ] [
-            [ load ] [ loaded-child-vocab-names ] bi
-        ] if help-lint-vocabs
+            [ load ] [ help-lint ] bi
+        ] if
     ] each
     lint-failures get assoc-empty?
     [ [ "==== FAILING LINT" print :lint-failures flush ] unless ]