help.lint: use vocab-exists? and eliminate UI disposables from check.

char-rename
John Benediktsson 2016-07-16 16:22:06 -07:00
parent ccbde89968
commit 51cf484361
2 changed files with 5 additions and 6 deletions

View 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

View 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