help.lint.checks: better error message for non-unique $see-also.

db4
John Benediktsson 2014-06-06 14:46:10 -07:00
parent 018d12b29b
commit 3ec5c7074d
1 changed files with 2 additions and 3 deletions

View File

@ -105,9 +105,8 @@ SYMBOL: vocab-articles
[ "$values should not contain null" simple-lint-error ] when ; [ "$values should not contain null" simple-lint-error ] when ;
: check-see-also ( element -- ) : check-see-also ( element -- )
\ $see-also swap elements [ \ $see-also swap elements [ rest all-unique? ] all?
rest all-unique? t assert= [ "$see-also are not unique" simple-lint-error ] unless ;
] each ;
: vocab-exists? ( name -- ? ) : vocab-exists? ( name -- ? )
[ lookup-vocab ] [ all-vocabs get member? ] bi or ; [ lookup-vocab ] [ all-vocabs get member? ] bi or ;