mirror of
https://github.com/github/codeql-action.git
synced 2026-04-29 02:18:47 +00:00
Introduce addNoLanguageDiagnostic
This commit is contained in:
Generated
+14
-20
@@ -88122,6 +88122,15 @@ function addDiagnostic(config, language, diagnostic) {
|
||||
unwrittenDiagnostics.push({ diagnostic, language });
|
||||
}
|
||||
}
|
||||
function addNoLanguageDiagnostic(config, diagnostic) {
|
||||
addDiagnostic(
|
||||
config,
|
||||
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||
// increases the risk of misinterpreting the data.
|
||||
config.languages[0],
|
||||
diagnostic
|
||||
);
|
||||
}
|
||||
function writeDiagnostic(config, language, diagnostic) {
|
||||
const logger = getActionsLogger();
|
||||
const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation;
|
||||
@@ -89910,11 +89919,8 @@ function isCodeQualityEnabled(config) {
|
||||
}
|
||||
async function logGitVersionTelemetry(config, gitVersion) {
|
||||
if (config.languages.length > 0) {
|
||||
addDiagnostic(
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||
// increases the risk of misinterpreting the data.
|
||||
config.languages[0],
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/git-version-telemetry",
|
||||
"Git version telemetry",
|
||||
@@ -89930,11 +89936,8 @@ async function logGeneratedFilesTelemetry(config, duration, generatedFilesCount)
|
||||
if (config.languages.length < 1) {
|
||||
return;
|
||||
}
|
||||
addDiagnostic(
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||
// increases the risk of misinterpreting the data.
|
||||
config.languages[0],
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/generated-files-telemetry",
|
||||
"Generated files telemetry",
|
||||
@@ -92692,11 +92695,8 @@ async function run(startedAt) {
|
||||
logger
|
||||
});
|
||||
if (repositoryPropertiesResult.isFailure()) {
|
||||
addDiagnostic(
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||
// increases the risk of misinterpreting the data.
|
||||
config.languages[0],
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/repository-properties-load-failure",
|
||||
"Failed to load repository properties",
|
||||
@@ -92748,11 +92748,8 @@ async function run(startedAt) {
|
||||
await recordZstdAvailability(config, zstdAvailability);
|
||||
}
|
||||
if (toolsDownloadStatusReport) {
|
||||
addDiagnostic(
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||
// increases the risk of misinterpreting the data.
|
||||
config.languages[0],
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/bundle-download-telemetry",
|
||||
"CodeQL bundle download telemetry",
|
||||
@@ -93022,11 +93019,8 @@ function getTrapCachingEnabled() {
|
||||
return true;
|
||||
}
|
||||
async function recordZstdAvailability(config, zstdAvailability) {
|
||||
addDiagnostic(
|
||||
addNoLanguageDiagnostic(
|
||||
config,
|
||||
// Arbitrarily choose the first language. We could also choose all languages, but that
|
||||
// increases the risk of misinterpreting the data.
|
||||
config.languages[0],
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/zstd-availability",
|
||||
"Zstandard availability",
|
||||
|
||||
Reference in New Issue
Block a user