You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ed97238
Browse filesBrowse the repository at this point in the historyBrowse files
fix/ only show code actions related to project file if project file is present (#102)
* fix/ only show code actions related to project file if project file is present
* save project file regardless of type, have project file store check for type
// Construct information message to display to the user
165
167
constfileMessagePart=file ? ` for file ${file}` : '';
166
168
constsymbolNameMessagePart=symbolName ? ` for symbol name ${symbolName}` : '';
167
169
constfileOrSymbolExtraMessage=file||symbolName ? '. Note: you have to re-analyze the file for the suppression to take effect.' : '';
168
-
constcompleteInformationMessageText=`Suppression of ${diagnosticCode} added to project file ${cppcheckProjectFileUri.toString()}${fileMessagePart}${symbolNameMessagePart}${fileOrSymbolExtraMessage}`;
170
+
constcompleteInformationMessageText=`Suppression of ${diagnosticCode} added to project file ${projectFileStore.getUri()?.toString()}${fileMessagePart}${symbolNameMessagePart}${fileOrSymbolExtraMessage}`;
vscode.window.showErrorMessage(`Failed to add suppression of ${diagnosticCode} to project file ${cppcheckProjectFileUri.toString()}`);
178
+
vscode.window.showErrorMessage(`Failed to add suppression of ${diagnosticCode} to project file ${projectFileStore.getUri()?.toString()}`);
177
179
}
178
180
}else{
179
-
vscode.window.showInformationMessage(`Adding suppression is currently only supported for .cppcheck project files`);
181
+
thrownewError(`Cppcheck Official error: Command 'cppcheck-official.suppressWarningAll' for project file level suppression called without project file present!`);
180
182
}
181
183
}
182
184
)
@@ -520,7 +522,7 @@ async function runCppcheckOnFileXML(
520
522
});
521
523
522
524
letusingProjectFile=false;
523
-
cppcheckProjectFileUri=undefined;
525
+
projectFileStore.clear();
524
526
525
527
constargs=[
526
528
'--enable=all',
@@ -532,12 +534,8 @@ async function runCppcheckOnFileXML(
532
534
if(processedArgs.includes("--project=")){
533
535
usingProjectFile=true;
534
536
args.push(`--file-filter=${filePath}`);
535
-
// If project file is of type .cppcheck we keep track of it
0 commit comments