File: format-all

package info (click to toggle)
consensuscore 1.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,384 kB
  • sloc: cpp: 38,940; python: 2,083; ansic: 542; sh: 184; makefile: 82; cs: 10
file content (9 lines) | stat: -rwxr-xr-x 342 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash

# This command can be run by the user to clang-format everything.

PLATFORM=$(uname)
TOOLSPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
CLANGFORMAT="${TOOLSPATH}/${PLATFORM}/clang-format -style=file"

find include src \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' \) -print0 | xargs -n1 -0 ${CLANGFORMAT} -i