Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-22382

Clang/Clazy analysis has bad default and bad error message

    XMLWordPrintable

Details

    • f223c094a18c21a70894e66f83a7efb165b838ac (qt-creator/qt-creator/4.10)

    Description

      1. Create a new project.
        I used a default Qt Widgets Application.
      2. From the menu, select "Analyze" -> "Clang-Tidy and Clazy...".
      3. From the combo box, select "Custom Settings".
        Note that "Build the project before analysis" is not checked.
      4. 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.
      5. 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kosjar Nikolai Kosjar
            rlohning Robert Löhning
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes