File: clang-format-check

package info (click to toggle)
android-platform-build-kati 10.0.0%2Br32%2Bgit20220314.09dfa26c4e59-7.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,628 kB
  • sloc: cpp: 10,340; sh: 1,087; python: 85; makefile: 46
file content (15 lines) | stat: -rwxr-xr-x 327 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

if [ -z "$CLANG_FORMAT" ]; then
  CLANG_FORMAT="clang-format"
fi

for f in $(ls src/*.cc src/*.h); do
  if ! diff -U 1 <($CLANG_FORMAT $f) $f; then
    echo
    echo "!!!!!!"
    echo "!! Failed clang-format check, please run 'clang-format -i src/*.cc src/*.h'" 1>&2
    echo "!!!!!!"
    exit 1
  fi
done