Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122260

IndentingLineWriter not always correctly indent when carryover

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • Some future release
    • 6.8.0
    • QML: Tooling
    • None
    • f52ad733a (dev)

    Description

      When working on the QTBUG-117849, it was suggested to add some tests for carrying over lines when formatting https://codereview.qt-project.org/c/qt/qtdeclarative/+/537746/comment/63ce657c_81e07c33/

       

      As at attempt to address this the corresponding test has been introduced https://codereview.qt-project.org/c/qt/qtdeclarative/+/540056/comment/6cdb406e_08b3820f/

      However, it was found out that IndentingLineWriter is not always doing the work as expected.

      For example, for the input "export const n1=1,n2=2,n3=3,n4=4,n5=5" it calculates the indent as equal to 0, hence, when the code is carried over, it starts writing it from the position 0.

       

      The introduced test and `int FormatPartialStatus::indentLine()` might be a good starting point for the further investigation and fixing it.

      Attachments

        For Gerrit Dashboard: QTBUG-122260
        # Subject Branch Project Status CR V

        Activity

          People

            qtqmlteam Qt Qml Team User
            dima.a Dmitrii Akshintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes