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

qmlformat: Sort import statements too

    XMLWordPrintable

Details

    • 506c74d7827a2199ddf4f9b9e18090ba30e52f1c 9eb57ada3b66fe42a3be61dc7f8890cbc4bf5df5

    Description

      qmlformat --normalize currently sorts properties, functions, etc. alphabetically but it doesn't sort import statements. (This contradicts the documentation at https://doc.qt.io/qt-6/qtquick-tools-and-utilities.html#qmlformat , with or without --normalize; see QTBUG-107213)

       

      Suggestion

      Sort import statements alphabetically by URI too.

       

      Extended suggestion

      A customer expressed interest in being able to group "native" Qt imports separately from custom project imports. A toggleable option to sort by absolute module path could help here?

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes