-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
There are several issues with qmlformat that can prevent it from being used in projects, especially in large code bases:
- Lack of customizability thus making the tool useless if you require non default formatting
- No support for indents that aren't 4 spaces
- Placement of braces is not customizable
- All formatting options need to be specified on the command line instead of being able to just format a file based on a .clang-format like file
- The current way parts of the QML file are restructured require aggresive "attachment" of commands to nodes which often causes comments to be moved in unexpected ways
This task serves to track individual fixes to these issues.
| For Gerrit Dashboard: QTBUG-86409 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 312428,7 | qmlformat: Add indent options | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 378325,5 | qmlformat: Implement settings file | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 670450,9 | qmlformat: Pass fileLocations to writeRegion for conditional output | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 670451,2 | qmlformat: let OutWrite accept DomItem in constructor | dev | qt/qtdeclarative | Status: ABANDONED | -1 | 0 |
| 670452,17 | qmlformat: disable formatting of non-script expressions via comments | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 670679,16 | doc: document qmlformat disable feature | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 673157,6 | qmlformat: Disable WriteOutCheck at runtime | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 673158,6 | qmlformat: Expose sourceLocation for Comment | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 673159,1 | Refactor writeOut API to consistently pass DomItem | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
| 673160,2 | qmlformat: Pass fileLocations to writeRegion for conditional output | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
| 673162,7 | qmlformat: Enable file locations for script expressions in default dom creation | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
| 673163,12 | qmlformat: Add FormatDirectiveScanner for qmlformat directive support | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 673164,1 | qmlformat: Add support for disabling formatting via comments | dev | qt/qtdeclarative | Status: ABANDONED | 0 | 0 |
| 673165,15 | qmlformat: Support disabling formatting for script expressions via comments | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
| 675031,15 | qmlformat: stop moving comments around QmlObjects | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
| 678439,5 | qmlformat: expand OutWriter's constructor | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |