diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-format-c | 16 | ||||
-rwxr-xr-x | scripts/format-csharp | 4 |
2 files changed, 20 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 diff --git a/scripts/format-csharp b/scripts/format-csharp new file mode 100755 index 0000000000..974ce555a4 --- /dev/null +++ b/scripts/format-csharp @@ -0,0 +1,4 @@ +#!/bin/bash +set -e + +dotnet-format subprojects/gstreamer-sharp/gstreamer-sharp.sln --include sources/custom/\*.cs $@ |