From 7d6657cacfc4fde99168f32ece72a903f3b4f4b9 Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Thu, 17 Apr 2025 13:57:49 -0700 Subject: [PATCH 1/2] Don't show bogus errors for compilerPath + args in config UI --- Extension/src/LanguageServer/configurations.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 6870619b8..be1340214 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -1617,7 +1617,11 @@ export class CppProperties { } const settings: CppSettings = new CppSettings(this.rootUri); const compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(!!settings.legacyCompilerArgsBehavior, resolvedCompilerPath); + + // compilerPath + args in the same string isn't working yet. + const skipFullCommandString = !compilerPathAndArgs.compilerName && resolvedCompilerPath.indexOf(" ") >= 0; if (resolvedCompilerPath + && !skipFullCommandString // Don't error cl.exe paths because it could be for an older preview build. && compilerPathAndArgs.compilerName.toLowerCase() !== "cl.exe" && compilerPathAndArgs.compilerName.toLowerCase() !== "cl") { @@ -1795,7 +1799,7 @@ export class CppProperties { if (!this.configurationJson) { return; } - if ((this.configurationJson.enableConfigurationSquiggles !== undefined && !this.configurationJson.enableConfigurationSquiggles) || + if ((this.configurationJson.enableConfigurationSquiggles === false) || (this.configurationJson.enableConfigurationSquiggles === undefined && !settings.defaultEnableConfigurationSquiggles)) { this.diagnosticCollection.clear(); return; From 012abee9e789721ce0f02caf59fa101871ecff6b Mon Sep 17 00:00:00 2001 From: Bob Brown Date: Thu, 17 Apr 2025 16:00:48 -0700 Subject: [PATCH 2/2] PR feedback --- Extension/src/LanguageServer/configurations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index be1340214..26bbd86ec 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -1619,7 +1619,7 @@ export class CppProperties { const compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(!!settings.legacyCompilerArgsBehavior, resolvedCompilerPath); // compilerPath + args in the same string isn't working yet. - const skipFullCommandString = !compilerPathAndArgs.compilerName && resolvedCompilerPath.indexOf(" ") >= 0; + const skipFullCommandString = !compilerPathAndArgs.compilerName && resolvedCompilerPath.includes(" "); if (resolvedCompilerPath && !skipFullCommandString // Don't error cl.exe paths because it could be for an older preview build.