help.lint.checks: factored out to no-ui-disposables word.

char-rename
John Benediktsson 2016-07-16 16:28:04 -07:00
parent 51cf484361
commit c9801980ed
1 changed files with 8 additions and 5 deletions

View File

@ -18,6 +18,13 @@ M: simple-lint-error error. summary print ;
SYMBOL: vocabs-quot SYMBOL: vocabs-quot
SYMBOL: vocab-articles SYMBOL: vocab-articles
: no-ui-disposables ( seq -- seq' )
[
class-of name>> {
"line" "single-texture" "multi-texture"
} member?
] reject ;
: check-example ( element -- ) : check-example ( element -- )
[ [
'[ '[
@ -28,11 +35,7 @@ SYMBOL: vocab-articles
] keep ] keep
last assert= last assert=
] vocabs-quot get call( quot -- ) ] vocabs-quot get call( quot -- )
] leaks members [ ] leaks members no-ui-disposables length [
class-of name>> {
"line" "single-texture" "multi-texture"
} member?
] reject length [
"%d disposable(s) leaked in example" sprintf simple-lint-error "%d disposable(s) leaked in example" sprintf simple-lint-error
] unless-zero ; ] unless-zero ;