Skip to content

Commit

Permalink
Normalize messages for bad paths
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbrow committed Oct 29, 2024
1 parent d56740e commit 7615539
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Extension/src/LanguageServer/configurations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ export class CppProperties {
compilerPath = checkPathExists.path;
}
if (!compilerPathExists) {
compilerMessage = localize('cannot.find2', "Cannot find \"{0}\".", compilerPath);
compilerMessage = localize('cannot.find', "Cannot find: {0}", compilerPath);
newSquiggleMetrics.PathNonExistent++;
}
if (compilerMessage) {
Expand All @@ -1975,7 +1975,7 @@ export class CppProperties {
dotConfigPath = checkPathExists.path;
}
if (!dotConfigPathExists) {
dotConfigMessage = localize('cannot.find2', "Cannot find \"{0}\".", dotConfigPath);
dotConfigMessage = localize('cannot.find', "Cannot find: {0}", dotConfigPath);
newSquiggleMetrics.PathNonExistent++;
} else if (dotConfigPath && !util.checkFileExistsSync(dotConfigPath)) {
dotConfigMessage = localize("path.is.not.a.file", "Path is not a file: {0}", dotConfigPath);
Expand Down Expand Up @@ -2083,7 +2083,7 @@ export class CppProperties {
} else {
badPath = `"${expandedPaths[0]}"`;
}
message = localize('cannot.find2', "Cannot find {0}", badPath);
message = localize('cannot.find', "Cannot find: {0}", badPath);
newSquiggleMetrics.PathNonExistent++;
} else {
// Check for file versus path mismatches.
Expand Down Expand Up @@ -2141,7 +2141,7 @@ export class CppProperties {
endOffset = curOffset + curMatch.length;
let message: string;
if (!pathExists) {
message = localize('cannot.find2', "Cannot find \"{0}\".", expandedPaths[0]);
message = localize('cannot.find', "Cannot find: {0}", expandedPaths[0]);
newSquiggleMetrics.PathNonExistent++;
const diagnostic: vscode.Diagnostic = new vscode.Diagnostic(
new vscode.Range(document.positionAt(envTextStartOffSet + curOffset),
Expand Down

0 comments on commit 7615539

Please sign in to comment.