mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
macOS / build (push) Has been cancelled
Windows / build (push) Has been cancelled
action image update for https://github.com/actions/runner-images/issues/11101
28 lines
658 B
YAML
28 lines
658 B
YAML
name: style check
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
# with all history
|
|
fetch-depth: 0
|
|
- name: Validate BOM
|
|
run: |
|
|
ret=0
|
|
for i in $(git diff --name-only origin/${GITHUB_BASE_REF}...${GITHUB_SHA}); do
|
|
if [ -f ${i} ]; then
|
|
case ${i} in
|
|
*.c|*.cc|*.cpp|*.h)
|
|
if file ${i} | grep -qv BOM; then
|
|
echo "Missing BOM in ${i}" && ret=1;
|
|
fi
|
|
;;
|
|
esac
|
|
fi
|
|
done
|
|
exit ${ret}
|