gazebosim / gz-gui

Builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.
https://gazebosim.org
Apache License 2.0
72 stars 41 forks source link

Add a QML code checker #73

Open chapulina opened 4 years ago

chapulina commented 4 years ago

When running make codecheck we run cppcheck for the C++ code. It would be nice to also check that our QML code is following some basic consistent style.

I haven't tried it, but maybe this tool is useful:

https://github.com/jesperhh/qmlfmt

ahcorde commented 3 years ago

@chapulina, I was having a quick look to the qmlfmt tool. The down side it's that there is only binaries for MacOS. We should probably create our own binaries for Linux and Windows.

I also saw some weird indentation:

chapulina commented 3 years ago

I was having a quick look to the qmlfmt tool

Thanks!

The down side it's that there is only binaries for MacOS. We should probably create our own binaries for Linux and Windows.

Since this would be a development tool, it would be ok not to distribute binaries. We could instruct users to use it from source and also use it from source on CI.

I also saw some weird indentation:

Ouch yeah that looks weird. I'd be ok living with it to get the benefit of standardization and quick formatting though.