SELECT
LANGUAGE(file_path, blob_content) as lang,
SUM(JSON_EXTRACT(LOC(file_path, blob_content), '$.Code')) as code,
SUM(JSON_EXTRACT(LOC(file_path, blob_content), '$.Comments')) as comments,
SUM(JSON_EXTRACT(LOC(file_path, blob_content), '$.Blanks')) as blanks,
COUNT(1) as files
FROM commit_files
NATURAL JOIN refs
NATURAL JOIN blobs
WHERE ref_name='HEAD'
GROUP BY lang;
Actually is not working.
After updating goloc (a library that is used under the hood), they changed the output struct and instead of Code the output now is code and so on.
We should wrap that output struct to be sure that output JSON won't change if library changes.
This query from the documentation:
Actually is not working.
After updating goloc (a library that is used under the hood), they changed the output struct and instead of
Code
the output now iscode
and so on.We should wrap that output struct to be sure that output JSON won't change if library changes.