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

Improvement of clang-format support in Beautifier with customized style.

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 17.0.1
    • None
    • Linux/X11

      Hello all, 

      Beautifier plugin is copying the current source file into a directory where it will create the .clang-format file with the current style option and then, it calls clang-format on that copy in that directory and then put it back into the source tree. 
      This behavior only occurs when selected a non predefined style.  

      I would like to suggest to use the option: `clang-format -i -style=file:/path/to/.clang-format FileToFormat.cpp`. No need to copy the source file. 

      Is it possible or there is a technical reason to use this strange mechanism ? I believe this option is recent in clang-format but I may be wrong.  

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

            Unassigned Unassigned
            obiwankennedy renaud.guezennec
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes