Skip to content

Commit 95bed40

Browse files
committed
clear file relations when full analysis is ran
1 parent 4a32b5d commit 95bed40

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎src/extension.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ function getDocumentSha1(document: vscode.TextDocument): string {
176176
.digest('hex');
177177
}
178178

179+
function clearFileRelationMap() {
180+
for (const fileUri of Object.keys(fileRelationMap)) {
181+
fileRelationMap[fileUri].clear;
182+
}
183+
}
184+
179185
// This method is called when your extension is activated.
180186
// Your extension is activated the very first time the command is executed.
181187
export async function activate(context: vscode.ExtensionContext) {
@@ -874,6 +880,9 @@ async function runFullAnalysis(
874880
// Clear existing diagnostics for all files
875881
uriDiagnosticsMap.clear();
876882

883+
// Clear file relation map when we run full analysis
884+
clearFileRelationMap();
885+
877886
// We always call cppcheck with severity level info, and then filter warnings when displaying them
878887
const minSevNum = SeverityNumber.Info;
879888

0 commit comments

Comments
 (0)