cheshirekow / cmake_format

Source code formatter for cmake listfiles.
GNU General Public License v3.0
941 stars 103 forks source link

cmake-lint expects UPPERCASE macro names but cmake-format makes all invocations lowercase #302

Open PatTheMav opened 1 year ago

PatTheMav commented 1 year ago

Out of the box, cmake-lint will expect macro names to be all uppercase, yet cmake-format will make all invocations of a macro lowercase (which would only be correct for invocations of functions).

As mentioned in https://github.com/cheshirekow/cmake_format/issues/73, cmake-format would require to parse CMake scripts (like CMake itself) to distinguish between the too, but this leads to a situation where files formatted by cmake-format will never be able to pass the linter.

Maybe changing the guidelines used by cmake-lint to accept macros as lowercase (like functions) could help.