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>
This commit is contained in:
Seungha Yang 2023-02-21 22:24:17 +09:00
parent 2f629b435b
commit f3f220d04b
2 changed files with 24 additions and 0 deletions

11
.indent_cpp_list Normal file
View file

@ -0,0 +1,11 @@
subprojects/gst-plugins-bad/gst-libs/gst/cuda
subprojects/gst-plugins-bad/gst-libs/gst/d3d11
subprojects/gst-plugins-bad/gst-libs/gst/winrt
subprojects/gst-plugins-bad/sys/amfcodec
subprojects/gst-plugins-bad/sys/d3d11
subprojects/gst-plugins-bad/sys/mediafoundation
subprojects/gst-plugins-bad/sys/nvcodec
^(subprojects/gst-plugins-bad/sys/qsv/)+(\w)+([^/])+(cpp$)
subprojects/gst-plugins-bad/sys/wasapi2
subprojects/gst-plugins-bad/sys/wic
^(subprojects/gst-plugins-bad/sys/win32ipc/)+(\w)+([^/])+(cpp$)

View file

@ -16,3 +16,16 @@ if test -f ".indentignore"; then
fi fi
fi fi
git ls-files "*.c" | "${filter_cmd[@]}" | xargs -d '\n' $BASEDIR/gst-indent 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