Add baseline metrics for lines of code

This commit uses a third party library to estimate the lines of code in
a database that is to be analyzed by codeql.

The estimate uses the same includes and excludes globs for determining
which files should be counted.

The lines of code count is returned by language and injected into the
SARIF as `baseline` property in the `${language}/summary/lines-of-code`
metric.
This commit is contained in:
Andrew Eisenberg 2021-04-16 14:52:39 -07:00
parent 7c5b1287d5
commit 998f472183
11 changed files with 379 additions and 41 deletions

View file

@ -69,6 +69,7 @@ async function run() {
"Config file could not be found at expected location. Has the 'init' action been called?"
);
}
const apiDetails = {
auth: actionsUtil.getRequiredInput("token"),
url: actionsUtil.getRequiredEnvParam("GITHUB_SERVER_URL"),