TheLartians/Format.cmake

fix-format and check-format does not give same result

groskopf opened this issue · 1 comments

I have problems with check-format target failing, even though fix-format is not making any changes.
I have a file in a subdir where cmake-format should be disabled. Therefore I have places a file called ".cmake-format" containing:

disable: true

This is disables the fix-format actions. But check-format is still failing with this error:

CMake Error at cmake/modules/Format.cmake/cmake-format.cmake:58 (message):
cmake/modules/CodeCoverage.cmake needs to be reformatted

CodeCoverage.cmake is the file that I want to have ignored.

Thanks for raising the issue! I agree that both commands should behave the same way. We should rework the code for checking the formatting in cmake-format.cmake.