diff --git a/extra/help/lint/coverage/coverage-tests.factor b/extra/help/lint/coverage/coverage-tests.factor index 0dfa2fdafe..1996931e48 100644 --- a/extra/help/lint/coverage/coverage-tests.factor +++ b/extra/help/lint/coverage/coverage-tests.factor @@ -19,8 +19,8 @@ PRIVATE> { f } [ \ a-defined-word empty-examples? ] unit-test { f } [ \ keep empty-examples? ] unit-test -{ { $description $inputs $outputs } } [ \ an-empty-word-with-a-unique-name missing-sections natural-sort ] unit-test -{ { $description $inputs $outputs } } [ \ a-defined-word missing-sections natural-sort ] unit-test +{ { $description $values } } [ \ an-empty-word-with-a-unique-name missing-sections natural-sort ] unit-test +{ { $description $values } } [ \ a-defined-word missing-sections natural-sort ] unit-test { { } } [ \ keep missing-sections ] unit-test { { "a.b" "a.b.c" } } [ { "a.b" "a.b.private" "a.b.c.private" "a.b.c" } filter-private ] unit-test @@ -32,8 +32,8 @@ PRIVATE> { { $examples } } [ \ an-empty-word-with-a-unique-name word-defines-sections ] unit-test { { $examples } } [ \ a-defined-word word-defines-sections ] unit-test { { } } [ \ a-nonexistent-word word-defines-sections ] unit-test -{ { $inputs $outputs $description $examples } } [ \ keep word-defines-sections ] unit-test -{ { $inputs $outputs $contract $examples } } [ \ word-defines-sections ] unit-test +{ { $values $description $examples } } [ \ keep word-defines-sections ] unit-test +{ { $values $contract $examples } } [ \ word-defines-sections ] unit-test { an-empty-word-with-a-unique-name } [ "an-empty-word-with-a-unique-name" find-word ] unit-test diff --git a/extra/help/lint/coverage/coverage.factor b/extra/help/lint/coverage/coverage.factor index 9f722a5c1d..27c5641d7c 100644 --- a/extra/help/lint/coverage/coverage.factor +++ b/extra/help/lint/coverage/coverage.factor @@ -95,15 +95,13 @@ M: word-help-coverage summary : filter-private ( seq -- no-private ) [ ".private" ?tail nip ] reject ; inline -: ?remove-$inputs ( word spec -- word spec ) - over "declared-effect" word-prop [ - in>> empty? [ \ $inputs swap remove ] when - ] when* ; - -: ?remove-$outputs ( word spec -- word spec ) - over "declared-effect" word-prop [ - out>> empty? [ \ $outputs swap remove ] when - ] when* ; +: ?remove-$values ( word spec -- spec ) + \ $values over member? [ + swap "declared-effect" word-prop [ + [ in>> ] [ out>> ] bi append [ + \ $values swap remove + ] [ drop ] if-empty + ] when* ] [ nip ] if ; : should-define ( word -- spec ) dup { @@ -112,12 +110,12 @@ M: word-help-coverage summary { [ dup primitive? ] [ drop { $description } ] } ! aliases should describe why they exist but ideally $values should be ! automatically inherited from the aliased word's docs - { [ dup alias? ] [ drop { $inputs $outputs $description } ] } - { [ dup error-class? ] [ drop { $inputs $outputs $description $error-description } ] } + { [ dup alias? ] [ drop { $values $description } ] } + { [ dup error-class? ] [ drop { $values $description $error-description } ] } { [ dup class? ] [ drop { $class-description } ] } - { [ dup generic? ] [ drop { $inputs $outputs $contract $examples } ] } - { [ dup word? ] [ drop { $inputs $outputs $description $examples } ] } - } cond ?remove-$inputs ?remove-$outputs nip ; + { [ dup generic? ] [ drop { $values $contract $examples } ] } + { [ dup word? ] [ drop { $values $description $examples } ] } + } cond ?remove-$values ; : word-defines-sections ( word -- seq ) word-help [ ignored-words member? not ] filter [ ?first ] map ;