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.
|For Gerrit Dashboard: QTCREATORBUG-22382|
|265631,2||ClangTools: Make building before starting analysis default||4.10||qt-creator/qt-creator||Status: MERGED||+2||0|
|265632,5||ClangTools: Hint to "Build the project before starting" option||4.10||qt-creator/qt-creator||Status: MERGED||+2||0|
|266200,3||ClangTools: Show hint when disabling "Build the project before analysis."||4.10||qt-creator/qt-creator||Status: MERGED||+2||0|