Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import { CopilotCompletionContextFeatures, CopilotCompletionContextProvider } fr
import { CustomConfigurationProvider1, getCustomConfigProviders, isSameProviderExtensionId } from './customProviders';
import { DataBinding } from './dataBinding';
import { cachedEditorConfigSettings, getEditorConfigSettings } from './editorConfig';
import { CppSourceStr, clients, configPrefix, initializeIntervalTimer, isWritingCrashCallStack, updateLanguageConfigurations, usesCrashHandler, watchForCrashes } from './extension';
import { CppIntelliSenseSourceStr, CppSourceStr, clients, configPrefix, initializeIntervalTimer, isWritingCrashCallStack, updateLanguageConfigurations, usesCrashHandler, watchForCrashes } from './extension';
import { LocalizeStringParams, getLocaleId, getLocalizedString } from './localization';
import { PersistentFolderState, PersistentState, PersistentWorkspaceState } from './persistentState';
import { RequestCancelled, ServerCancelled, createProtocolFilter } from './protocolFilter';
Expand Down Expand Up @@ -155,7 +155,7 @@ function publishRefactorDiagnostics(params: PublishRefactorDiagnosticsParams): v
const message: string = getLocalizedString(d.localizeStringParams);
const diagnostic: vscode.Diagnostic = new vscode.Diagnostic(makeVscodeRange(d.range), message, d.severity);
diagnostic.code = d.code;
diagnostic.source = CppSourceStr;
diagnostic.source = CppSourceStr + ": Refactor";
if (d.relatedInformation) {
diagnostic.relatedInformation = [];
for (const info of d.relatedInformation) {
Expand Down Expand Up @@ -2696,7 +2696,7 @@ export class DefaultClient implements Client {
const message: string = getLocalizedString(d.localizeStringParams);
const diagnostic: vscode.Diagnostic = new vscode.Diagnostic(makeVscodeRange(d.range), message, d.severity);
diagnostic.code = d.code;
diagnostic.source = CppSourceStr;
diagnostic.source = CppIntelliSenseSourceStr;
if (d.relatedInformation) {
diagnostic.relatedInformation = [];
for (const info of d.relatedInformation) {
Expand Down
2 changes: 1 addition & 1 deletion Extension/src/LanguageServer/codeAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ export function publishCodeAnalysisDiagnostics(params: PublishCodeAnalysisDiagno
} else {
diagnostic.code = d.code;
}
diagnostic.source = CppSourceStr;
diagnostic.source = CppSourceStr + ": clang-tidy";
codeActionDiagnosticInfo.push(codeAction);
if (relatedCodeActions.length > 0) {
codeActionDiagnosticInfo.push(...relatedCodeActions);
Expand Down
3 changes: 2 additions & 1 deletion Extension/src/LanguageServer/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { makeLspRange, rangeEquals, showInstallCompilerWalkthrough } from './uti
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
export const CppSourceStr: string = "C/C++";
export const CppIntelliSenseSourceStr: string = CppSourceStr + ": IntelliSense";
export const configPrefix: string = "C/C++: ";

let prevMacCrashFile: string;
Expand Down Expand Up @@ -132,7 +133,7 @@ function isMissingIncludeDiagnostic(diagnostic: vscode.Diagnostic): boolean {
if (diagnostic.code === null || diagnostic.code === undefined || !diagnostic.source) {
return false;
}
return diagnostic.code === missingIncludeCode && diagnostic.source === 'C/C++';
return diagnostic.code === missingIncludeCode && diagnostic.source === CppIntelliSenseSourceStr;
}

function sendActivationTelemetry(): void {
Expand Down
Loading