diff options
author | Seungha Yang <seungha@centricular.com> | 2023-02-21 22:24:17 +0900 |
---|---|---|
committer | Seungha Yang <seungha@centricular.com> | 2023-02-28 10:12:31 +0000 |
commit | f3f220d04b9a3cd5214478330177f95766c2fb11 (patch) | |
tree | cdd2cde270a120c721e71850553be02d8a47adec /scripts | |
parent | 2f629b435ba32e7bacd785f9a692f88bf732081f (diff) | |
download | gstreamer-f3f220d04b9a3cd5214478330177f95766c2fb11.tar.gz |
ci: Run gst-indent for some cpp files
Those files follow gst-indent style and it would be good to have
a consistent style
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4023>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gst-indent-all | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/gst-indent-all b/scripts/gst-indent-all index ee878d838b..556dd19eec 100755 --- a/scripts/gst-indent-all +++ b/scripts/gst-indent-all @@ -16,3 +16,16 @@ if test -f ".indentignore"; then fi fi git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent + +if test -f ".indent_cpp_list"; then + filter_args=() + while read -r line; do + if test -n "$line"; then + filter_args+=("-e" "$line") + fi + done < ".indent_cpp_list" + if [[ ${#filter_args[@]} -gt 0 ]]; then + filter_cmd=("grep" "-E" "${filter_args[@]}") + git ls-files "*.cpp" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent + fi +fi |