diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2021-09-30 13:01:26 +0200 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-04-05 08:28:50 +0000 |
commit | f89dff303a1e06b91563d878607b5fb3c9e0cb04 (patch) | |
tree | e6624d1d2947608138b13ccdc8d3765ae97cd820 /scripts/check-format-c | |
parent | 8537433f24a04423f1b77f190badfc16169add6d (diff) | |
download | gstreamer-f89dff303a1e06b91563d878607b5fb3c9e0cb04.tar.gz |
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>
Diffstat (limited to 'scripts/check-format-c')
-rwxr-xr-x | scripts/check-format-c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/check-format-c b/scripts/check-format-c new file mode 100755 index 0000000000..61c2b5c1e0 --- /dev/null +++ b/scripts/check-format-c @@ -0,0 +1,16 @@ +#!/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 |