diff options
author | George Marques <george@gmarqu.es> | 2021-08-18 11:03:52 -0300 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2021-09-27 23:08:08 +1000 |
commit | e4ed48976a962b67e9585cc2d20d11f115ef7949 (patch) | |
tree | 7830ad6926b5cd14a91784b07c2eff5b77e3f533 /misc/scripts/clang_format.sh | |
parent | ee708668944430a7f1d69e8faf7b3f3160432dc2 (diff) | |
download | redot-cpp-e4ed48976a962b67e9585cc2d20d11f115ef7949.tar.gz |
Replace bindgins to work with extensions
Diffstat (limited to 'misc/scripts/clang_format.sh')
-rwxr-xr-x[-rw-r--r--] | misc/scripts/clang_format.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/misc/scripts/clang_format.sh b/misc/scripts/clang_format.sh index 0d1511e..955ff68 100644..100755 --- a/misc/scripts/clang_format.sh +++ b/misc/scripts/clang_format.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# This script runs clang-format on all relevant files in the repo. +# This script runs clang-format and fixes copyright headers on all relevant files in the repo. # This is the primary script responsible for fixing style violations. set -uo pipefail @@ -14,12 +14,29 @@ while IFS= read -rd '' f; do # Exclude some files. if [[ "$f" == "thirdparty"* ]]; then continue + # elif [[ "$f" == "gen"* ]]; then + # continue + elif [[ "$f" == "platform/android/java/lib/src/com/google"* ]]; then + continue + elif [[ "$f" == *"-so_wrap."* ]]; then + continue fi for extension in ${CLANG_FORMAT_FILE_EXTS[@]}; do if [[ "$f" == *"$extension" ]]; then # Run clang-format. clang-format -i "$f" + # Fix copyright headers, but not all files get them. + if [[ "$f" == *"inc" ]]; then + continue 2 + elif [[ "$f" == *"glsl" ]]; then + continue 2 + elif [[ "$f" == *"theme_data.h" ]]; then + continue 2 + elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then + continue 2 + fi + python misc/scripts/copyright_headers.py "$f" continue 2 fi done |