Commit 2e89d63 1 parent b72e8e0 commit 2e89d63 Copy full SHA for 2e89d63
File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 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
+ */
5
12
6
13
var mixinDocs = ( function ( ) {
7
14
'use strict' ;
@@ -103,7 +110,7 @@ var mixinDocs = (function () {
103
110
104
111
return {
105
112
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 + "');"
107
114
} ;
108
115
} ) ;
109
116
@@ -181,8 +188,9 @@ function documentChart(chartName) {
181
188
var method = m [ 0 ] == '_' ? m . substr ( 1 ) : m ;
182
189
if ( chart [ m ] [ mixinDocs . DOC ] )
183
190
model . covered . push ( method ) ;
184
- else
191
+ else {
185
192
model . missing . push ( method ) ;
193
+ }
186
194
} ) ;
187
195
model . covered . sort ( ) ;
188
196
model . missing . sort ( ) ;
You can’t perform that action at this time.
0 commit comments