Initial checkin of Pika from heckimp
This commit is contained in:
30
.gitlab/run_style_check_diff.sh
Normal file
30
.gitlab/run_style_check_diff.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
ancestor_horizon=28 # days (4 weeks)
|
||||
|
||||
echo ""
|
||||
echo "This script may be wrong. You may disregard it if it conflicts with"
|
||||
echo "https://gitlab.gnome.org/GNOME/pika/-/blob/master/CODING_STYLE.md"
|
||||
|
||||
clang-format --version
|
||||
|
||||
# Wrap everything in a subshell so we can propagate the exit status.
|
||||
(
|
||||
|
||||
source .gitlab/search-common-ancestor.sh
|
||||
|
||||
git diff -U0 --no-color "${newest_common_ancestor_sha}" | clang-format-diff -p1 > format-diff.log
|
||||
)
|
||||
exit_status=$?
|
||||
|
||||
[ ${exit_status} == 0 ] || exit ${exit_status}
|
||||
|
||||
format_diff="$(<format-diff.log)"
|
||||
|
||||
if [ -n "${format_diff}" ]; then
|
||||
cat format-diff.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user