Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Fix skipping reports #3559

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Conversation

csordasmarton
Copy link
Contributor

If a skip file was given to the CodeChecker parse command and one of
the mentioned file from the bug path was on the skip list we skipped that
report.

Example:
main.cpp:

#include "lib.h"

int main() {
  return foo(0);
}

lib.h:

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

skip file content:

+*/lib.h
-*

In this case if we analyzed this project and run on of the following
command, it returned with no results:

  • CodeChecker parse ./reports --skip skipfile.txt
  • CodeChecker parse ./reports --file "*/lib.h"

With this patch we will skip a report only if the last bug step is on the
skip list.

@csordasmarton csordasmarton added CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands bugfix 🔨 test ☑️ Adding or refactoring tests labels Dec 20, 2021
@csordasmarton csordasmarton added this to the release 6.19.0 milestone Dec 20, 2021
If a skip file was given to the `CodeChecker parse` command and one of
the mentioned file from the bug path was on the skip list we skipped that
report.

Example:
`main.cpp`:
```cpp
\#include "lib.h"

int main() {
  return foo(0);
}
```

`lib.h`:
```
double foo(int param) {
  return 1 / param;
}

```

`skip file content`:
```txt
+*/lib.h
-*
```

In this case if we analyzed this project and run on of the following
command, it returned with no results:
- `CodeChecker parse ./reports --skip skipfile.txt`
- `CodeChecker parse ./reports --file "*/lib.h"`

With this patch we will skip a report only if the last bug step is on the
skip list.
@bruntib bruntib merged commit 8ddb9bd into Ericsson:master Jan 4, 2022
@csordasmarton csordasmarton deleted the fix_skip_reports branch January 28, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix 🔨 CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands test ☑️ Adding or refactoring tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants