Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QML Coding Style Checker

I'm looking for a coding style checker for QML code. Something like Checkstyle or Artistic Style. What do people use to define coding style checks for their DSL of choice?

Clarification: I'm looking for something that can be used in build automation not a GUI tool.

like image 878
cellcortex Avatar asked Oct 14 '13 19:10

cellcortex


2 Answers

As far as I know QtCreator works well enough with QML. You can specify a coding style you'd like the editor to adhere to. Then use Tools > Reformat File to format the style.

like image 60
Jason Chan Avatar answered Sep 21 '22 08:09

Jason Chan


Since Qt 5.15, a new tool qmlformat is shipped which automatically formats any QML file according to the QML Coding Conventions.

Source: Qt 5.15 release notes

like image 36
Denis Rouzaud Avatar answered Sep 20 '22 08:09

Denis Rouzaud