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

This commit is contained in:
Georges Dupéron 2017-04-09 17:24:41 +02:00
parent b5471b1383
commit 5fb60065b7

View File

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