It is useful to know why the format checks failed. When it happens, use git diff to display the change that is required.
Motivation and Context
This patch modifies check-cmake.sh to behave the same as check-format.sh. It now unconditionally reformats the file to meet convention which check-changes.sh can detect. Then check-changes.sh can display all the formatting changes in the build log, making it easier to fix the issues quickly.
Description
It is useful to know why the format checks failed. When it happens, use git diff to display the change that is required.
Motivation and Context
This patch modifies check-cmake.sh to behave the same as check-format.sh. It now unconditionally reformats the file to meet convention which check-changes.sh can detect. Then check-changes.sh can display all the formatting changes in the build log, making it easier to fix the issues quickly.
How Has This Been Tested?
Tested locally and via GitHub actions CI
Example of output when formatting changes are needed can be seen here: https://github.com/glikely/obs-plugintemplate/actions/runs/4366259875/jobs/7636020253#step:7:1
Types of changes
Checklist: