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

Keep bug open when clicking on bug steps #30

Closed csordasmarton closed 2 years ago

csordasmarton commented 2 years ago

I have a main.cpp source file and a main.h header file:

#include "main.h"

int main() {
  return foo(0);
}
double foo(int param) {
  return 1 / param;
}

If I open this project and analyze it ClangSA will find a division by zero error: image

If I click on the first bug step which refer to the main.cpp source file it will show the bug step nicely in the source code. If I click on the 3rd bug step which refers to main.h file the plugin will show me the bug step in the source code but in the tree view it will close the bug: image

We should keep the bug open and keep the bug path selection (3rd bug step has to be selected) in this situation.