2022-10-03 23:18:28 +03:00
#!/bin/bash -ex
# Go to the top level directory
cd " $( git rev-parse --show-toplevel) "
SRC_DIR = $( pwd )
# Go one directory up, to avoid any global.json in xamarin-macios
cd ..
# Start formatting!
dotnet format " $SRC_DIR /tools/xibuild/xibuild.csproj "
dotnet format whitespace " $SRC_DIR /tests/cecil-tests/cecil-tests.csproj "
2022-10-07 09:05:53 +03:00
dotnet format whitespace " $SRC_DIR /tests/dotnet/UnitTests/DotNetUnitTests.csproj "
2022-10-03 23:18:28 +03:00
dotnet format whitespace " $SRC_DIR /msbuild/Messaging/Xamarin.Messaging.Build/Xamarin.Messaging.Build.csproj "
dotnet format whitespace " $SRC_DIR /msbuild/Xamarin.Localization.MSBuild/Xamarin.Localization.MSBuild.csproj "
dotnet format whitespace " $SRC_DIR /msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Tasks.csproj "
dotnet format whitespace " $SRC_DIR /msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.Tasks.csproj "
dotnet format whitespace " $SRC_DIR /msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj "
dotnet format whitespace " $SRC_DIR /msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj "
2022-10-25 23:47:07 +03:00
dotnet format whitespace " $SRC_DIR /src/bgen/bgen.csproj "
2022-10-03 23:18:28 +03:00
dotnet format whitespace " $SRC_DIR /tools/dotnet-linker/dotnet-linker.csproj "
2022-10-11 23:36:58 +03:00
dotnet format whitespace " $SRC_DIR /tools/mmp/mmp.csproj "
2022-10-13 11:42:41 +03:00
dotnet format whitespace " $SRC_DIR /tools/mtouch/mtouch.csproj "
2022-10-14 00:10:08 +03:00
dotnet format whitespace " $SRC_DIR /tests/xharness/xharness.sln "
2022-10-26 00:49:54 +03:00
dotnet format whitespace " $SRC_DIR /tools/siminstaller/siminstaller.csproj "
2022-11-07 17:20:26 +03:00
dotnet format whitespace " $SRC_DIR /tests/introspection/dotnet/iOS/introspection.csproj "
dotnet format whitespace " $SRC_DIR /tests/introspection/dotnet/MacCatalyst/introspection.csproj "
dotnet format whitespace " $SRC_DIR /tests/introspection/dotnet/macOS/introspection.csproj "
dotnet format whitespace " $SRC_DIR /tests/introspection/dotnet/tvOS/introspection.csproj "
dotnet format whitespace " $SRC_DIR /tests/introspection/iOS/introspection-ios.csproj "
dotnet format whitespace " $SRC_DIR /tests/introspection/Mac/introspection-mac.csproj "
2022-11-10 19:59:26 +03:00
dotnet format whitespace " $SRC_DIR /tests/monotouch-test/dotnet/iOS/monotouch-test.csproj "
dotnet format whitespace " $SRC_DIR /tests/monotouch-test/dotnet/MacCatalyst/monotouch-test.csproj "
dotnet format whitespace " $SRC_DIR /tests/monotouch-test/dotnet/macOS/monotouch-test.csproj "
dotnet format whitespace " $SRC_DIR /tests/monotouch-test/dotnet/tvOS/monotouch-test.csproj "
2022-10-06 08:30:47 +03:00
dotnet format whitespace " $SRC_DIR /tests/xtro-sharpie/xtro-sharpie.csproj "
dotnet format whitespace " $SRC_DIR /tests/xtro-sharpie/u2ignore/u2ignore.csproj "
dotnet format whitespace " $SRC_DIR /tests/xtro-sharpie/u2todo/u2todo.csproj "
dotnet format whitespace " $SRC_DIR /tests/xtro-sharpie/xtro-report/xtro-report.csproj "
dotnet format whitespace " $SRC_DIR /tests/xtro-sharpie/xtro-sanity/xtro-sanity.csproj "
2022-12-07 11:13:36 +03:00
dotnet format whitespace --folder " $SRC_DIR "
2022-10-03 23:18:28 +03:00
2023-02-01 18:59:42 +03:00
for file in " $SRC_DIR " /dotnet/Templates/Microsoft.*.Templates/*/*/.template.config/localize/*.json " $SRC_DIR " /dotnet/Templates/Microsoft.*.Templates/*/.template.config/localize/*.json; do
tr -d $'\r' < " $file " > " $file " .tmp
mv " $file " .tmp " $file "
done
2022-10-14 10:15:58 +03:00
2022-10-03 23:18:28 +03:00
# dotnet format "$SRC_DIR/[...]"
# add more projects here...
cd " $SRC_DIR "