mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 16:24:45 -07:00
rework formatting with cmake-format (#4627)
* merge clangify and cmakify into format.sh update desktop lint workflow to 22.04 print cmake-format version as well um, rename things? add extra examples to format.sh --help add option to not run clang-format fix version display in .ci/lint_cpp.sh fix relative paths in format.sh fix formatting dirs * run ./format.sh --cmake --branch "" * revert formatting of cmake comments
This commit is contained in:
parent
b79506fbcf
commit
28aa473362
19 changed files with 238 additions and 136 deletions
|
|
@ -10,10 +10,10 @@ if ! git merge-base origin/master HEAD; then
|
|||
git fetch --unshallow
|
||||
fi
|
||||
|
||||
# Check formatting using clangify
|
||||
echo "Checking your code using clang-format..."
|
||||
# Check formatting using format.sh
|
||||
echo "Checking your code using clang-format/cmake-format..."
|
||||
|
||||
diff="$(./clangify.sh --diff --cf-version --branch origin/master)"
|
||||
diff="$(./format.sh --diff --cmake --cf-version --branch origin/master)"
|
||||
err=$?
|
||||
|
||||
case $err in
|
||||
|
|
@ -24,7 +24,7 @@ case $err in
|
|||
*** ***
|
||||
*** Your code does not comply with our style guide. ***
|
||||
*** ***
|
||||
*** Please correct it or run the "clangify.sh" script. ***
|
||||
*** Please correct it or run the "format.sh" script. ***
|
||||
*** Then commit and push those changes to this branch. ***
|
||||
*** Check our CONTRIBUTING.md file for more details. ***
|
||||
*** ***
|
||||
|
|
@ -32,12 +32,14 @@ case $err in
|
|||
*** ***
|
||||
***********************************************************
|
||||
|
||||
Used clang-format version:
|
||||
Used version:
|
||||
${diff%%
|
||||
----------
|
||||
*}
|
||||
|
||||
The following changes should be made:
|
||||
${diff#*
|
||||
----------
|
||||
}
|
||||
|
||||
Exiting...
|
||||
|
|
@ -62,8 +64,6 @@ EOM
|
|||
;;
|
||||
|
||||
*)
|
||||
echo ""
|
||||
echo "Something went wrong in our formatting checks: clangify returned $err" >&2
|
||||
echo ""
|
||||
echo "Something went wrong in our formatting checks: format.sh returned $err" >&2
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue