Skip to content

Commit 2e89d63

Browse files
update comments with better understanding
and check in a log (commented out) that may help to figure out the false positives remove wrong fix for false positives
1 parent b72e8e0 commit 2e89d63

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/coverage.js

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
/* try to discover which methods have not been documented.
2-
this produces a lot of false positives because it reports
3-
functions that were inherited from base classes (which
4-
are never commented in the child class) */
1+
/*
2+
Try to discover which methods have not been documented.
3+
This instruments the dc source so that every constructor marks
4+
the methods it contains comments for. Then it constructs every
5+
chart type and sees whether the resulting object has methods on it
6+
that are not marked.
7+
8+
Unfortunately this has a few false positives, and even worse, we have
9+
LOTS of methods which are actually internal but aren't prefixed with _,
10+
so it's hard to wade through the 400+ results.
11+
*/
512

613
var mixinDocs = (function () {
714
'use strict';
@@ -103,7 +110,7 @@ var mixinDocs = (function () {
103110

104111
return {
105112
index: c.range[1] + 1,
106-
text: "\n" + assignment + JSON.stringify(doc) + ";\n"
113+
text: "\n" + assignment + JSON.stringify(doc) + ";\n" // + "console.log('" + c.for + "', '" + c.in + "');"
107114
};
108115
});
109116

@@ -181,8 +188,9 @@ function documentChart(chartName) {
181188
var method = m[0] == '_' ? m.substr(1) : m;
182189
if (chart[m][mixinDocs.DOC])
183190
model.covered.push(method);
184-
else
191+
else {
185192
model.missing.push(method);
193+
}
186194
});
187195
model.covered.sort();
188196
model.missing.sort();

0 commit comments

Comments
 (0)