Remove old baseline LoC injection

This commit is contained in:
Edoardo Pirovano 2021-08-26 13:46:22 +01:00
parent a44b61d961
commit 2e71e02553
No known key found for this signature in database
GPG key ID: 047556B5D93FFE28
9 changed files with 15 additions and 179 deletions

View file

@ -2,10 +2,6 @@ import { LocDir } from "github-linguist";
import { Language } from "./languages";
import { Logger } from "./logging";
import { assertNever } from "./util";
// Language IDs used by codeql when specifying its metrics.
export type IdPrefix = "cpp" | "cs" | "go" | "java" | "js" | "py" | "rb";
// Map from linguist language names to language prefixes used in the action and codeql
const linguistToMetrics: Record<string, Language> = {
@ -31,28 +27,6 @@ const nameToLinguist = Object.entries(linguistToMetrics).reduce(
{} as Record<Language, string[]>
);
export function getIdPrefix(language: Language): IdPrefix {
switch (language) {
case Language.cpp:
return "cpp";
case Language.csharp:
return "cs";
case Language.go:
return "go";
case Language.java:
return "java";
case Language.javascript:
return "js";
case Language.python:
return "py";
case Language.ruby:
return "rb";
default:
assertNever(language);
}
}
/**
* Count the lines of code of the specified language using the include
* and exclude glob paths.