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

clang-format not working as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • Qt Creator 13.0.1
    • None
    • Linux/Wayland

    Description

      Initially, I've copied my .clang-format file into the source/root directory of my project unchecking the "Use custom settings" checkbox (Preferences/C++/Code Style) and getting a yellow triangle warning about the inclusion of a .clang-format file in my current project that "..will be used for code indenting and formatting". Unfortunately, neither code indenting or formatting have been made on my code. Note that the same .clang-format file is working just fine from the terminal or from other IDEs.

      My "fast-and-easy" solution was to check "Use custom settings" checkbox, as mentioned above, and to create a "custom-settings" item by copying all of my .clang-format file into this custom settings item. Another, less significant, problem is that custom-settings use clang-format version 17.0.1 and not my current system's clang-format version 18.1.6, so I had to remove settings newer than 17.0.1. Fortunately, using this ugly method my cpp file was indented and formatted as expected. It is ok as a temporary solution but not as a permanent one. Please fix this clang-format problem. Thanks.

      PS I've searched Qt Creator past issues and found that similar problems were existed in previous versions of Qt Creator, fixed and suddenly has come up again.

       

      Attachments

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

        Activity

          People

            artem.sokolovskii Artem Sokolovskii (Inactive)
            nantoniad Nikolaos Antoniadis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes