File: check_style_docker.sh

package info (click to toggle)
cli11 2.4.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,120 kB
  • sloc: cpp: 23,299; python: 129; sh: 64; makefile: 11; ruby: 7
file content (14 lines) | stat: -rwxr-xr-x 441 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env sh

# Also good but untagged: CLANG_FORMAT=unibeautify/clang-format
# This might provide more control in the future: silkeh/clang:8 (etc)
CLANG_FORMAT=saschpe/clang-format:5.0.1

set -evx

docker run --rm ${CLANG_FORMAT} --version
docker run --rm --user $(id -u):$(id -g) -v "$(pwd)":/workdir -w /workdir ${CLANG_FORMAT} -style=file -sort-includes -i $(git ls-files -- '*.cpp' '*.hpp')

git diff --exit-code --color

set +evx