Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
6.9.1
-
None
Description
I've been trying to adopt qmlformat, but have hit some problems that can't be worked 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)
It would be nice if qmlformat allowed the maximum column width rule to be violated for linter disable comments. This is what clang-format does. Alternatively, adding support to disable the next line, similar to NOLINTNEXTLINE that clang-format uses, would be very useful.
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)