-
Notifications
You must be signed in to change notification settings - Fork 449
Introduce plist.err and parse --status #4674
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
Conversation
f39f052 to
78f72c1
Compare
|
Aren't |
ba24441 to
2bf9f70
Compare
If the
Is there a list of supported analyzers defined somewhere else? |
b0d8ea1 to
ddac313
Compare
|
I added error file generation for the other analyzers as well. |
5816837 to
ddac313
Compare
Currently, it is a problem to determine if the analysis was successful or failed during execution. With this patch, we will create plist.err files to indicate a failed analysis action. The parse --status command was also introduced to get the analysis summary of an existing report directory.
f64b463 to
96a4d9a
Compare
96a4d9a to
04ef9de
Compare
dkrupp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. I have some remarks after testing.
1)
Looks like the missing/failed/outdated/up-to-date statistics are ok
CodeChecker parse --status ./reports -e json
json return value however does not include the missing, failed, up-to-date file list.
soe the missing:[], up-to-date:[] etc. file lists are missing.
It is okay to leave them out from the CodeChecker parse --status ./reports textual output.
The normal textual output should also contain these missing/up-todate/failed etc. status count numbers.
CodeChecker parse --status ./reports
[INFO 2025-11-28 18:35] - ----==== Summary ====----
[INFO 2025-11-28 18:35] - Successfully analyzed
[INFO 2025-11-28 18:35] - clangsa: 2
[INFO 2025-11-28 18:35] - clang-tidy: 2
[INFO 2025-11-28 18:35] - cppcheck: 2
[INFO 2025-11-28 18:35] - Failed to analyze
[INFO 2025-11-28 18:35] - Total analyzed compilation commands: 2
[INFO 2025-11-28 18:35] - Total available compilation commands: 2
[INFO 2025-11-28 18:35] - ----=================----
In the normal txt output when calling status with an invalid file, the output should at least warn the user that the source is not in the compilation database.
CodeChecker parse --status ./reports --file ../xmltest.cpp_no_such_file
[INFO 2025-11-28 18:37] - ----==== Summary ====----
[INFO 2025-11-28 18:37] - Successfully analyzed
[INFO 2025-11-28 18:37] - Failed to analyze
[INFO 2025-11-28 18:37] - Total analyzed compilation commands: 0
[INFO 2025-11-28 18:37] - Total available compilation commands: 0
[INFO 2025-11-28 18:37] - ----=================----
from this, the user will not understand that there is no analysis result for the requested file.
I corrupted one source file file xmltest.cpp, but looks like gcc and cppcheck thinks the analysis result is ok.
I think the error of these analyzers are not handled.
(CodeChecker venv-dev) ednikru@seliiuvd02700[18:45][test-projects/tinyxml2/build]$ CodeChecker parse --status ./reports -e json
{
"analyzers": {
"clangsa": {
"summary": {
"up-to-date": 1,
"outdated": 0,
"missing": 0,
"failed": 1,
"successful": 1
}
},
"clang-tidy": {
"summary": {
"up-to-date": 1,
"outdated": 0,
"missing": 0,
"failed": 1,
"successful": 1
}
},
"cppcheck": {
"summary": {
"up-to-date": 2,
"outdated": 0,
"missing": 0,
"failed": 0,
"successful": 2
}
},
"gcc": {
"summary": {
"up-to-date": 2,
"outdated": 0,
"missing": 0,
"failed": 0,
"successful": 2
}
This was an intentional decision but it can be changed.
Implemented in commit: 568388d
Fixed in commit: 568388d
I investigated this an it's related how we handle analyze failures. Example file: #include <iostream>
int main()
{
return 0 // compile error, missing ;
}When we analyze this file with clangsa or clang-tidy, we get an error code of 1 which indicates an error. |
|
Thanks. For me the --detailed switch does not emit the file level status list. CodeChecker parse ./reports --status --detailed |
dkrupp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --detailed flag does not show the list of files.
Can you also please add some basic test cases?
|
I would also find it useful if you could add the analys summary automatically at the end of the normal
Can you pls do that? |
It was implemented for the JSON view (-e json), but now I added to the regular summary message as well: a502e03
Implemented in latest commit: 367e956 |
367e956 to
1e4e91b
Compare
af6f99a to
baa7ee9
Compare
e2212eb to
5fbc27e
Compare
5fbc27e to
d7446d6
Compare
dkrupp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Fixes #4100 |
Currently, it is a problem to determine if the analysis was successful or failed during execution.
With this patch, we will create plist.err files to indicate a failed analysis action.
The parse --status command was also introduced to
get the analysis summary of an existing report directory.