help.lint.coverage: change $values to $inputs and $outputs.
parent
eded28cc74
commit
61102548f4
|
@ -19,8 +19,8 @@ PRIVATE>
|
||||||
{ f } [ \ a-defined-word empty-examples? ] unit-test
|
{ f } [ \ a-defined-word empty-examples? ] unit-test
|
||||||
{ f } [ \ keep empty-examples? ] unit-test
|
{ f } [ \ keep empty-examples? ] unit-test
|
||||||
|
|
||||||
{ { $description $values } } [ \ an-empty-word-with-a-unique-name missing-sections natural-sort ] unit-test
|
{ { $description $inputs $outputs } } [ \ an-empty-word-with-a-unique-name missing-sections natural-sort ] unit-test
|
||||||
{ { $description $values } } [ \ a-defined-word missing-sections natural-sort ] unit-test
|
{ { $description $inputs $outputs } } [ \ a-defined-word missing-sections natural-sort ] unit-test
|
||||||
{ { } } [ \ keep missing-sections ] 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
|
{ { "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 } } [ \ an-empty-word-with-a-unique-name word-defines-sections ] unit-test
|
||||||
{ { $examples } } [ \ a-defined-word word-defines-sections ] unit-test
|
{ { $examples } } [ \ a-defined-word word-defines-sections ] unit-test
|
||||||
{ { } } [ \ a-nonexistent-word word-defines-sections ] unit-test
|
{ { } } [ \ a-nonexistent-word word-defines-sections ] unit-test
|
||||||
{ { $values $description $examples } } [ \ keep word-defines-sections ] unit-test
|
{ { $inputs $outputs $description $examples } } [ \ keep word-defines-sections ] unit-test
|
||||||
{ { $values $contract $examples } } [ \ <word-help-coverage> word-defines-sections ] unit-test
|
{ { $inputs $outputs $contract $examples } } [ \ <word-help-coverage> word-defines-sections ] unit-test
|
||||||
|
|
||||||
{ an-empty-word-with-a-unique-name } [ "an-empty-word-with-a-unique-name" find-word ] unit-test
|
{ an-empty-word-with-a-unique-name } [ "an-empty-word-with-a-unique-name" find-word ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -95,13 +95,15 @@ M: word-help-coverage summary
|
||||||
: filter-private ( seq -- no-private )
|
: filter-private ( seq -- no-private )
|
||||||
[ ".private" ?tail nip ] reject ; inline
|
[ ".private" ?tail nip ] reject ; inline
|
||||||
|
|
||||||
: ?remove-$values ( word spec -- spec )
|
: ?remove-$inputs ( word spec -- word spec )
|
||||||
\ $values over member? [
|
over "declared-effect" word-prop [
|
||||||
swap "declared-effect" word-prop [
|
in>> empty? [ \ $inputs swap remove ] when
|
||||||
[ in>> ] [ out>> ] bi append [
|
] when* ;
|
||||||
\ $values swap remove
|
|
||||||
] [ drop ] if-empty
|
: ?remove-$outputs ( word spec -- word spec )
|
||||||
] when* ] [ nip ] if ;
|
over "declared-effect" word-prop [
|
||||||
|
out>> empty? [ \ $outputs swap remove ] when
|
||||||
|
] when* ;
|
||||||
|
|
||||||
: should-define ( word -- spec )
|
: should-define ( word -- spec )
|
||||||
dup {
|
dup {
|
||||||
|
@ -110,12 +112,12 @@ M: word-help-coverage summary
|
||||||
{ [ dup primitive? ] [ drop { $description } ] }
|
{ [ dup primitive? ] [ drop { $description } ] }
|
||||||
! aliases should describe why they exist but ideally $values should be
|
! aliases should describe why they exist but ideally $values should be
|
||||||
! automatically inherited from the aliased word's docs
|
! automatically inherited from the aliased word's docs
|
||||||
{ [ dup alias? ] [ drop { $values $description } ] }
|
{ [ dup alias? ] [ drop { $inputs $outputs $description } ] }
|
||||||
{ [ dup error-class? ] [ drop { $values $description $error-description } ] }
|
{ [ dup error-class? ] [ drop { $inputs $outputs $description $error-description } ] }
|
||||||
{ [ dup class? ] [ drop { $class-description } ] }
|
{ [ dup class? ] [ drop { $class-description } ] }
|
||||||
{ [ dup generic? ] [ drop { $values $contract $examples } ] }
|
{ [ dup generic? ] [ drop { $inputs $outputs $contract $examples } ] }
|
||||||
{ [ dup word? ] [ drop { $values $description $examples } ] }
|
{ [ dup word? ] [ drop { $inputs $outputs $description $examples } ] }
|
||||||
} cond ?remove-$values ;
|
} cond ?remove-$inputs ?remove-$outputs nip ;
|
||||||
|
|
||||||
: word-defines-sections ( word -- seq )
|
: word-defines-sections ( word -- seq )
|
||||||
word-help [ ignored-words member? not ] filter [ ?first ] map ;
|
word-help [ ignored-words member? not ] filter [ ?first ] map ;
|
||||||
|
|
Loading…
Reference in New Issue