Skip to content

Commit 97ef1aa

Browse files
authored
Don't show bogus errors for compilerPath + args in config UI (#13531)
1 parent 799d09f commit 97ef1aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,11 @@ export class CppProperties {
16171617
}
16181618
const settings: CppSettings = new CppSettings(this.rootUri);
16191619
const compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(!!settings.legacyCompilerArgsBehavior, resolvedCompilerPath);
1620+
1621+
// compilerPath + args in the same string isn't working yet.
1622+
const skipFullCommandString = !compilerPathAndArgs.compilerName && resolvedCompilerPath.includes(" ");
16201623
if (resolvedCompilerPath
1624+
&& !skipFullCommandString
16211625
// Don't error cl.exe paths because it could be for an older preview build.
16221626
&& compilerPathAndArgs.compilerName.toLowerCase() !== "cl.exe"
16231627
&& compilerPathAndArgs.compilerName.toLowerCase() !== "cl") {
@@ -1795,7 +1799,7 @@ export class CppProperties {
17951799
if (!this.configurationJson) {
17961800
return;
17971801
}
1798-
if ((this.configurationJson.enableConfigurationSquiggles !== undefined && !this.configurationJson.enableConfigurationSquiggles) ||
1802+
if ((this.configurationJson.enableConfigurationSquiggles === false) ||
17991803
(this.configurationJson.enableConfigurationSquiggles === undefined && !settings.defaultEnableConfigurationSquiggles)) {
18001804
this.diagnosticCollection.clear();
18011805
return;

0 commit comments

Comments
 (0)