diff --git a/.indent_cpp_list b/.indent_cpp_list new file mode 100644 index 0000000000..9b36aac870 --- /dev/null +++ b/.indent_cpp_list @@ -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$) 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