Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.9.1
-
Ubuntu 18.04 LTS 64 bit
-
f223c094a18c21a70894e66f83a7efb165b838ac (qt-creator/qt-creator/4.10)
Description
- 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.