From aafb363a3487e547ea349d0717f489557eb82252 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Fri, 6 May 2022 01:24:19 +0800 Subject: [PATCH] Only enable EnforceCodeStyleInBuild in CI --- .github/workflows/ci.yml | 7 +++++-- Directory.Build.props | 1 - osu.Android.props | 1 - osu.iOS.props | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4d7f894d4..57069a0ae2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,9 @@ jobs: path: ${{ github.workspace }}/inspectcode key: inspectcode-${{ hashFiles('.config/dotnet-tools.json') }}-${{ hashFiles('.github/workflows/ci.yml' ) }} + - name: Dotnet code style + run: dotnet build -c Debug -warnaserror osu.Desktop.slnf -p:EnforceCodeStyleInBuild=true + - name: CodeFileSanity run: | # TODO: Add ignore filters and GitHub Workflow Command Reporting in CFS. That way we don't have to do this workaround. @@ -128,7 +131,7 @@ jobs: # cannot accept .sln(f) files as arguments. # Build just the main game for now. - name: Build - run: msbuild osu.Android/osu.Android.csproj /restore /p:Configuration=Debug /p:EnforceCodeStyleInBuild=false + run: msbuild osu.Android/osu.Android.csproj /restore /p:Configuration=Debug build-only-ios: name: Build only (iOS) @@ -147,4 +150,4 @@ jobs: # cannot accept .sln(f) files as arguments. # Build just the main game for now. - name: Build - run: msbuild osu.iOS/osu.iOS.csproj /restore /p:Configuration=Debug /p:EnforceCodeStyleInBuild=false + run: msbuild osu.iOS/osu.iOS.csproj /restore /p:Configuration=Debug diff --git a/Directory.Build.props b/Directory.Build.props index 65ffe02584..73a150d3e3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -20,7 +20,6 @@ - true $(MSBuildThisFileDirectory)CodeAnalysis\osu.ruleset diff --git a/osu.Android.props b/osu.Android.props index 299f236220..2866ec24a6 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -19,7 +19,6 @@ cjk,mideast,other,rare,west SdkOnly prompt - false True diff --git a/osu.iOS.props b/osu.iOS.props index d16c6803f4..f987ae9bf8 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -11,7 +11,6 @@ iPhone Developer true - false