mumble/scripts/runClangFormat.sh
Robert Adam 459a3bf888 MAINT: Added clang-format support
The used .clang-format file has been generated using clang-format 6
(shipped with Ubuntu 18.04) and is therefore backwards compatible with
all clang-format versions until v6.
2020-09-11 18:28:38 +02:00

17 lines
582 B
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright 2005-2020 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
currentDir=$(dirname $0)
mainDir="$currentDir/.."
cd "$mainDir"
find -type f \( -iname "*.cpp" -o -iname "*.c" -o -iname "*.hpp" -o -iname "*.h" -o -iname "*.cxx" -o -iname "*.cc" \) \
-a -not -ipath "./3rdparty/*" -a -not -path "./.git/*" -a -not -ipath "./build/*" \
| xargs clang-format --style=file -i