cagebreak/test/clang-format
2024-01-01 01:07:15 +01:00

26 lines
442 B
Bash

#! /bin/sh
# Copyright 2023 - 2024, project-repo and the cagebreak contributors
# SPDX-License-Identifier: MIT
readonly declared_deps="${*}"
readonly deps="${declared_deps}"
RESULT=0
set -x
echo "${MESONCURRENTCONFIGDIR}"
for file in ${deps}
do
echo "${file}"
if (clang-format -Werror --dry-run "${MESONCURRENTCONFIGDIR}/${file}")
then
echo " [x] clang-format"
else
RESULT=1
echo " [ ] clang-format"
fi
done
exit "${RESULT}"