From fe886fc8f33b1c340cd4e4931e74cd4ec52d6fbd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 30 Jan 2009 03:45:51 -0600 Subject: [PATCH] Help lint: check for empty description elements --- basis/help/lint/lint.factor | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/basis/help/lint/lint.factor b/basis/help/lint/lint.factor index d3316a0c12..b5f8b78ea3 100755 --- a/basis/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -114,12 +114,22 @@ SYMBOL: vocabs-quot [ 2 [ [ string? ] all? ] filter [ first2 check-whitespace ] each ] } cleave ; +: check-descriptions ( element -- ) + { $description $class-description $var-description } + swap '[ + _ elements [ + rest { { } { "" } } member? + [ "Empty description" throw ] when + ] each + ] each ; + : check-markup ( element -- ) { [ check-elements ] [ check-rendering ] [ check-examples ] [ check-modules ] + [ check-descriptions ] } cleave ; : all-word-help ( words -- seq )