www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5fb60065b75a17953bebd867acad180a50ee1050
parent b5471b1383511342dd6b226c4651ff02592b4a29
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Sun,  9 Apr 2017 17:24:41 +0200

Allow specifying a "skip" regexp on the command-line.

Diffstat:
Mdoc-coverage/raco.rkt | 22+++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/doc-coverage/raco.rkt b/doc-coverage/raco.rkt @@ -12,16 +12,16 @@ ; do-ignore! : (U string symbol) regex -> boolean (define (do-ignore! mod ignore) - (error "Ignore not implemented yet") - #f - #;(define missing - (with-output-to-string - (lambda () - (parameterize ([current-error-port (current-output-port)]) - (check-docs mod #:skip ignore))))) - #;(match missing - ["" (printf "Module ~a is documented~n" a) #t] - [else (printf "Module ~a is missing documentation for ~a~n" a missing) #f])) + (define undoc + (filter-not (λ (name) (regexp-match ignore (symbol->string name))) + (module->undocumented-exported-names + (if (symbol? mod) mod (string->symbol mod))))) + (cond [(set-empty? undoc) + (printf "Module ~a is completely documented~n" mod) + #f] + [else + (printf "Module ~a is missing documentation for: ~a~n" mod undoc) + #t])) ; do-binding! : (U string symbol) symbol -> boolean (define (do-binding! mod binding) @@ -95,7 +95,7 @@ (cond [(set-empty? undoc) (printf "Module ~a is completely documented~n" mod)] [else - (printf "Module ~a is missing documentation for: ~a~n" a undoc) + (printf "Module ~a is missing documentation for: ~a~n" mod undoc) (error-on-exit? #t)])]))) (when (error-on-exit?)