File: check-code-formatting

package info (click to toggle)
openrct2 0.4.29%2Bds-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 104,244 kB
  • sloc: cpp: 676,472; ansic: 1,322; javascript: 716; xml: 640; sh: 439; python: 313; php: 34; makefile: 19
file content (20 lines) | stat: -rwxr-xr-x 575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env sh

set -e

readlink_bin='readlink'

if [ "$(uname)" == "Darwin" ]; then
  if ! [ -x "$(command -v greadlink)" ]; then
    echo 'Please install greadlink with Homebrew: brew install coreutils'
    exit 1
  fi
  readlink_bin='greadlink'
fi

# Ensure we are in root directory
basedir="$($readlink_bin -f `dirname $0`/..)"
cd $basedir

scripts/run-clang-format.py -i --clang-format-executable /usr/lib/llvm20/bin/clang-format -r src test data/shaders --exclude src/thirdparty --extensions "c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx,vert,frag,mm"
git diff --exit-code