mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
13 lines
390 B
Bash
Executable File
13 lines
390 B
Bash
Executable File
#!/bin/sh
|
|
# Based on Github Action
|
|
# https://github.com/yshui/git-clang-format-lint
|
|
|
|
diff=$(git-clang-format --diff --commit "$CI_MERGE_REQUEST_DIFF_BASE_SHA")
|
|
[ "$diff" = "no modified files to format" ] && exit 0
|
|
[ "$diff" = "clang-format did not modify any files" ] && exit 0
|
|
|
|
printf "You have introduced coding style breakages, suggested changes:\n\n"
|
|
|
|
echo "${diff}" | colordiff
|
|
exit 1
|