https://github.com/jackfirth/doc-coverage
A Racket package for inspecting and testing the number of documented exports of a module
https://github.com/jackfirth/doc-coverage
Last synced: 3 months ago
JSON representation
A Racket package for inspecting and testing the number of documented exports of a module
- Host: GitHub
- URL: https://github.com/jackfirth/doc-coverage
- Owner: jackfirth
- License: apache-2.0
- Created: 2015-02-21T06:54:54.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T00:55:59.000Z (over 5 years ago)
- Last Synced: 2025-03-24T05:17:14.569Z (10 months ago)
- Language: Racket
- Size: 33.2 KB
- Stars: 7
- Watchers: 4
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
doc-coverage [](https://travis-ci.org/jackfirth/doc-coverage) [](https://codecov.io/gh/jackfirth/doc-coverage)
=====================================================
[Documentation](http://pkg-build.racket-lang.org/doc/doc-coverage/index.html)
A Racket package for inspecting and testing the number of documented exports of a module
Examining module documentation information:
```racket
> (module->all-exported-names 'racket/promise)
'(force
promise-forced?
promise-running?
promise?
delay
delay/thread
delay/name
lazy
delay/sync
delay/strict
delay/idle)
> (module->undocumented-exported-names 'racket/match)
'(match-...-nesting)
```
Testing module documentation coverage
```racket
> (check-all-documented 'racket/base)
--------------------
FAILURE
name: check-all-documented
location: (unsaved-editor307 30 2 704 35)
expression: (check-all-documented 'racket/base)
params: (racket/base)
Module racket/base has 3 undocumented bindings:
expand-for-clause
for-clause-syntax-protect
syntax-pattern-variable?
--------------------
> (check-documentation-ratio 'racket/match .99)
--------------------
FAILURE
name: check-documentation-ratio
location: (unsaved-editor307 45 2 1113 45)
expression: (check-documentation-ratio 'racket/match 0.99)
params: (racket/match 0.99)
Module racket/match does not document at least 99.0% of its bindings, only documents 96.42857142857143%
--------------------
```
To install, `run raco pkg install doc-coverage`. Then to use in a module, `(require doc-coverage)`.