File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,21 @@ FROM ( SELECT MONTH(committer_when) as month,
140
140
ON YEAR(c.committer_when) = 2018 AND r.commit_hash = c.commit_hash
141
141
WHERE r.ref_name = 'HEAD'
142
142
) as t GROUP BY committer_email, committer_name, month, repository_id`
143
+ } ,
144
+ {
145
+ name : 'Number of functions per file for Go' ,
146
+ sql : ` /* Number of funtions per file for Golang at HEAD */
147
+ SELECT files.repository_id, files.file_path,
148
+ ARRAY_LENGTH(UAST(
149
+ files.blob_content,
150
+ LANGUAGE(files.file_path, files.blob_content),
151
+ '//*[@roleFunction and @roleDeclaration]'
152
+ )) as functions
153
+ FROM files
154
+ NATURAL JOIN refs
155
+ WHERE
156
+ LANGUAGE(files.file_path,files.blob_content) = 'Go'
157
+ AND refs.ref_name = 'HEAD'`
143
158
}
144
159
] ;
145
160
}
You can’t perform that action at this time.
0 commit comments