igvc-software icon indicating copy to clipboard operation
igvc-software copied to clipboard

Add style formatting / linting for CMakeLists.txt

Open oswinso opened this issue 5 years ago • 2 comments

The styling for our CMakeLists.txt is very varied and there isn't a standard right now, ie. parenthesis on newline or same line, how many spaces etc.

https://github.com/RoboJackets/igvc-software/blob/ac53f57ffd426bfbdb1252c44555f3ea77d9b276/igvc_navigation/CMakeLists.txt#L9-L38

https://github.com/RoboJackets/igvc-software/blob/ac53f57ffd426bfbdb1252c44555f3ea77d9b276/igvc_navigation/src/mapper/CMakeLists.txt#L2-L10

https://github.com/RoboJackets/igvc-software/blob/ac53f57ffd426bfbdb1252c44555f3ea77d9b276/igvc_platform/CMakeLists.txt#L106-L110

https://github.com/RoboJackets/igvc-software/blob/ac53f57ffd426bfbdb1252c44555f3ea77d9b276/igvc_platform/CMakeLists.txt#L150-L153

We should use a tool / linter / styler to make sure all our CMakeLists.txt are styled the same way.

oswinso avatar Nov 29 '19 22:11 oswinso

Found a library that does this, don't know how to implement it though

https://github.com/richq/cmake-lint

matthewhannay567 avatar Feb 20 '20 00:02 matthewhannay567

That library doesn't seem to be maintained though... :(

oswinso avatar Feb 20 '20 03:02 oswinso