Closed polskikh closed 6 years ago
(By all means, DO NOT RELY ON metadata.json
, IT'S FORMAT OR CONTENTS! That is an internal artifact that is only used to carry CodeChecker-specific information (that is not the actual bug reports) between the "facades" of CodeChecker (log
-> analyze
-> parse
/store
).)
I've been out of the loop regarding CodeChecker, but if the web GUI really shows the number of failed files (it didn't back when I was around :slightly_smiling_face: ) then you could try obtaining a machine-readable JSON run information via CodeChecker cmd runs -o json --url [...]
.
@whisperity CodeChecker cmd runs -o json --url
will return just this information:
{
"REPORT_NAME": {
"detectionStatusCount": {
},
"runDate": "2018-11-01 15:10:57.108259",
"name": "REPORT_NAME",
"versionTag": "TAG",
"runCmd": "CodeChecker.py check -b make -o output_folder -j 10 --ctu",
"runId": 49,
"duration": 1521,
"resultCount": 2089
},
}
Ok, If I shouldn't read metadata.json
, how can I get clangsa
and clang-tidy
stats? Search in stdout?
We use codechecker 6.7.1 as CLI and 6.8 as server
Analyzer statistics as a feature (https://github.com/Ericsson/codechecker/commit/b5b815b2a767dabb405e2ce4b195bb2166f66896) was introduced in release 6.8. Please update your CLI.
The getRunData
function returns a RunDataList
, in which each element contains an analyzer statistics data
field:
The JSON output should show these fields.
If you don't request the JSON output, you also should see this value:
Hi @whisperity , it's awesome!
I think we can close this issue
Thanks for the help and your time! 🙂
I need to get information about analyzer statistics (successful, failed). At the moment I can get this information only from
metadata.json
file, right?But what if I want to get this information from storage using CLI? Because this information is stored and I can see it in UI.
Because I have cases when I need to get this information and pass it to another service (for example for dashboards). And I don't have CodeChecker artifacts (metadata.json)
What do you think about it?