test: verify overlay analysis is disabled for languages without per-language feature flags

This commit is contained in:
Sam Robson
2026-03-05 18:28:34 +00:00
parent e04697664c
commit 867f2b0e0a
14 changed files with 22 additions and 15 deletions
+17
View File
@@ -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
View File
@@ -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,