Ericsson / CodecheckerVSCodePlugin

VSCode plugin that shows bugs detected by the Clang Static Analyzer and Clang Tidy analyzers using CodeChecker as a backend.
Apache License 2.0
24 stars 7 forks source link

Do not add analysis of the same file multiple times in the analysis queue #73

Closed dkrupp closed 2 years ago

dkrupp commented 2 years ago

Unfortunately clang analysis can last for minutes. During this time, the user may save (and thus retrigger) the analysis multiple times. It is enough to analyze the changed file only once, after the last seen change, so analyzing the file multiple times is unnecessary.

If the same file is being saved multiple times while the analysis is ongoing, do not add the re-analysis of the same file multiple times to the analysis queue, because it is superflous. Instead, check in the queue if there is already an existing ongoing analysis for the same file. If there is, do not add it at the back fo the queue. If there is a running analsyis for the file being queued, the analysis should be interrupted and restarted.