mirror of
https://github.com/github/codeql-action.git
synced 2026-05-02 11:50:08 +00:00
test: verify overlay analysis is disabled for languages without per-language feature flags
This commit is contained in:
@@ -2011,6 +2011,23 @@ for (const language in KnownLanguage) {
|
||||
);
|
||||
}
|
||||
|
||||
// Verify that a language without a per-language overlay feature flag cannot have
|
||||
// overlay analysis enabled, even when the base overlay feature flag is on.
|
||||
// Using cpp here as it doesn't currently have overlay support — update this if
|
||||
// cpp gains overlay support.
|
||||
test.serial(
|
||||
checkOverlayEnablementMacro,
|
||||
"No overlay analysis for language without per-language overlay feature flag",
|
||||
{
|
||||
languages: [KnownLanguage.cpp],
|
||||
features: [Feature.OverlayAnalysis],
|
||||
isPullRequest: true,
|
||||
},
|
||||
{
|
||||
disabledReason: OverlayDisabledReason.LanguageNotEnabled,
|
||||
},
|
||||
);
|
||||
|
||||
test.serial(
|
||||
"hasActionsWorkflows doesn't throw if workflows folder doesn't exist",
|
||||
async (t) => {
|
||||
|
||||
+5
-3
@@ -630,9 +630,11 @@ async function loadUserConfig(
|
||||
}
|
||||
}
|
||||
|
||||
// Maps languages to their overlay analysis feature flags. Only languages that
|
||||
// are GA or in staff-ship for overlay analysis are included here. Languages
|
||||
// without an entry will have overlay analysis disabled.
|
||||
/**
|
||||
* Maps languages to their overlay analysis feature flags. Only languages that
|
||||
* are GA or in staff-ship for overlay analysis are included here. Languages
|
||||
* without an entry will have overlay analysis disabled.
|
||||
*/
|
||||
const OVERLAY_ANALYSIS_FEATURES: Partial<Record<Language, Feature>> = {
|
||||
csharp: Feature.OverlayAnalysisCsharp,
|
||||
go: Feature.OverlayAnalysisGo,
|
||||
|
||||
Reference in New Issue
Block a user