mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00

Related-To: NEO-6259 Closes: intel/compute-runtime#459 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
27 lines
501 B
Bash
Executable File
27 lines
501 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Copyright (C) 2021 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
set -e
|
|
|
|
clang-format-11 --version
|
|
|
|
INPUT_PATH="${INPUT_PATH:-.}"
|
|
INPUT_IREGEX="${INPUT_IREGEX:-.*\.(cpp|h|inl)}"
|
|
|
|
(
|
|
cd ${INPUT_PATH}
|
|
git fetch origin ${GITHUB_BASE_REF}
|
|
set -x
|
|
git diff -U0 --no-color origin/master..HEAD | clang-format-diff-11 -p1 -i -v -iregex ${INPUT_IREGEX}
|
|
set +x
|
|
)
|
|
|
|
if [ -n "$(git -C ${INPUT_PATH} status --porcelain)" ]; then
|
|
git -C ${INPUT_PATH} diff
|
|
exit 1
|
|
fi
|