Format.cmake icon indicating copy to clipboard operation
Format.cmake copied to clipboard

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

Open groskopf opened this issue 3 years ago • 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.

groskopf avatar Dec 23 '22 11:12 groskopf

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.

TheLartians avatar Feb 19 '23 14:02 TheLartians