mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Add diagnostic for unrecognised keys
This commit is contained in:
@@ -4,6 +4,10 @@ import * as yaml from "js-yaml";
|
||||
import * as jsonschema from "jsonschema";
|
||||
import * as semver from "semver";
|
||||
|
||||
import {
|
||||
addNoLanguageDiagnostic,
|
||||
makeTelemetryDiagnostic,
|
||||
} from "../diagnostics";
|
||||
import * as errorMessages from "../error-messages";
|
||||
import {
|
||||
RepositoryProperties,
|
||||
@@ -112,6 +116,16 @@ export function mergeDefaultSetupAndUserConfigs(
|
||||
logger.warning(
|
||||
`Unrecognised keys in Default Setup configuration: ${schemaCheckResult.unknownKeys.join(", ")}`,
|
||||
);
|
||||
addNoLanguageDiagnostic(
|
||||
undefined,
|
||||
makeTelemetryDiagnostic(
|
||||
"codeql-action/unrecognised-default-setup-config-keys",
|
||||
"Unrecognised Default Setup configuration keys",
|
||||
{
|
||||
unrecognisedKeys: schemaCheckResult.unknownKeys,
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Combine all specified threat models from both sources.
|
||||
|
||||
Reference in New Issue
Block a user