Open dkrupp opened 5 months ago
Going to respond to it point-by-point for clarity.
1, and 2, are possible, as CodeChecker parse
reports if the current analysis is outdated based on file hashes.
3, requires that the extension gets a list of all files that are currently being analyzed from CodeChecker analyze
, including from runs that are queued, but haven't been started yet (!).
4, would require CodeChecker to store that the last analysis on a file failed, and it should also store a reason it failed as well.
The last analysis' errors and good runs are saved in metadata.json
, but not the reasons.
Historical data beyond the last-run analysis is lost, as that would need an incremental update of metadata.json
or another file.
5, For a file present in compile_commands.json
, CodeChecker needs to track whether the relevant compilation commands were ever executed, and if they finished without eg. any reports, or potentially without any applicable analyses being run on the file.
For a file not present in the compilation database, it is a so-called "research team and 5 years" problem: it would require us to track if a file has been touched by any analysis that ran before.
As a concrete example, header files are not present in the compilation database, but they are likely contain reports originating from cpp files that are present. The absence of reports in this case does not equate to an absence of analysis.
6, runs into a similar issue, where header files are again likely to contain reports, even though they are not in the compilation database.
Feature here should be that the user should re-analyze the TU that generated the report.
7, would require either us or CodeChecker to save the disruption of the analysis as an error, similar to 4,.
I would prefer if CodeChecker were the one to write the error's reason.
When I open a file, the "Reports in Current file" view should give me information about the current status of the analyis:
1) "Up-to-date" The reports are up to date and reflect the latest status of the opened source code 2) "Outdated" The reports shown reflect an earlier successful analysis execution, but do not reflect the current file version. The user need to rerun the analysis to update the results. 3) "Executing" The analysis is being executed for the current file and the reports should be refreshed shortly 4) "Error" The analysis was attempted to be executed, but CodeChecker (analyze or parse) returned an error. There should be an easily accessible link to the terminal output for this analysis/parse where the user can start debugging/can send a bug report. 5) "Never Analyzed" The current file was never analyzed. (It will be upon saving or manual trigger). 6) "Error: compile command unavailable" The file cannot be analyzed because the compilation data is unavailable: compile_command.json does not contain the file/it is corrupt or missing. User should be warned to check the compilation database/or build logging. 7) "Error: Analysis timed out" The analysis command was running too long and it was disrupted to protect the users' computer.