Commit 1ab716b7 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

citemplate: add support for .indentignore file to indent job

See gst-plugins-bad!1465

Part-of: <!328>
parent 91c85b7c
......@@ -358,7 +358,20 @@ gst indent:
script:
# man indent. grep RETURN VALUE, grab a beer on my behalf...
- indent --version || true
- find . -name '*.c' -exec gst-indent {} +
- |
filter_cmd="cat"
if test -f ".indentignore"; then
filter_args=""
while read -r line; do
if test -n "$line"; then
filter_args="$filter_args -e $line"
fi
done < ".indentignore"
if test -n "$filter_args"; then
filter_cmd="grep -v $filter_args"
fi
fi
find . -name '*.c' | $filter_cmd | xargs gst-indent
- |
if git diff --quiet; then
echo "Code is properly formatted"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment