Priority: P2: Important
Affects Version/s: Qt Creator 4.9.1
Fix Version/s: Qt Creator 4.10.0-beta2
Component/s: Clang Tidy & Clazy Analyzer
Environment:Ubuntu 18.04 LTS 64 bit
- Create a new project.
I used a default Qt Widgets Application.
- From the menu, select "Analyze" -> "Clang-Tidy and Clazy...".
- From the combo box, select "Custom Settings".
Note that "Build the project before analysis" is not checked.
- Make sure that "Clang-Tidy and Clazy preselected checks [built-in] is selected from the other combo box and that all files are selected for analysis.
- Click "Analyze".
This will take a while and then present error messages like:
:-1: error: Failed to analyze "/tmp/Testprojekte/untitled2/mainwindow.cpp": Clang-Tidy and Clazy finished with exit code: 1.
:-1: error: Clang-Tidy and Clazy: Not all files could be analyzed.
This is not helpful because it does not give any indication how to fix the situation.
It seems that these checks require an existing build of the project, so two or three things should be improved:
- "Build the project before analysis" should be checked by default.
- If the user disables building, there could be a warning about the consequences.
- When the checks failed because there is no build in place, the error messages should indicate that building first might fix the problem.