Hi Qt

I've been trying to adopt qmlformat, but have hit some problems I can't work around.

1. qmlformat moves comments for disabling qmllint to new lines, and in some cases it is impossible to get the disable on the correct line.  For example:

   EIUMAPQTE.ResourceMapHistoryControls { // qmllint disable required

becomes

   EIUMAPQTE.ResourceMapHistoryControls {
      // qmllint disable required

(because of MaxColumnWidth)

Ideally I would expect qmlformat to allow the maximum column width rule to be violated for linter disable comments. This is what clang-format does. Alternatively, and this would be nice, is to support a disable for the next line, similar to NOLINTNEXTLINE that clang-format supports.


2. qmlformat is removing some of the type annotations. For example:

   property var isSelected: function (dayOfMonth_, selectedDate_: Date) {
        return dayOfMonth_ == selectedDate_.getDate();
   }

becomes

   property var isSelected: function (dayOfMonth_, selectedDate_) {
        return dayOfMonth_ == selectedDate_.getDate();

   }

(the ': Date' annotation has been removed)

What is the best way to report this? Should it get a PR?

Many thanks
Matthew Fincham
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to