We need to refactor the src/parser/metrics/CommentLines.ts:
Use SimpleLanguageSpecificQueryStatement instead of SimpleQueryStatement for block comment query (Python). SimpleQueryStatement does not specify the language to query on and is very error prone. We may remove it entirely.
add function addQueryForPython and use it in the constructor instead of proving parseFile.language in calculate(...)
use #statementsSuperSet instead of private statementsSuperSet, since the last one does not transpile the variable to private correctly. We may change that in every metric.
use query.capture instead of query.match, since we only have a capture for each match (YAGNI)
We need to refactor the
src/parser/metrics/CommentLines.ts
:SimpleLanguageSpecificQueryStatement
instead ofSimpleQueryStatement
for block comment query (Python).SimpleQueryStatement
does not specify the language to query on and is very error prone. We may remove it entirely.addQueryForPython
and use it in the constructor instead of provingparseFile.language
incalculate(...)
#statementsSuperSet
instead ofprivate statementsSuperSet
, since the last one does not transpile the variable to private correctly. We may change that in every metric.query.capture
instead ofquery.match
, since we only have a capture for each match (YAGNI)