gstreamer/scripts/check-format-c
Andoni Morales Alastruey f89dff303a gstreamer-sharp: ensure a consitent code format
Use EditorConfig and dotnet-format to ensure a consistent
code style.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/983>
2022-04-05 08:28:50 +00:00

16 lines
407 B
Bash
Executable file

#!/bin/bash
set -e
CUR_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
indent --version || true
$CUR_DIR/gst-indent-all
if git diff --quiet -- ':!subprojects/gst-integration-testsuites/medias' .; then
echo "Code is properly formatted"
else
git diff --color=always -- ':!subprojects/gst-integration-testsuites/medias' .
echo 'style diverges, please run gst-indent first'
exit 1
fi