From 5e934cdd2bdb4badf923c90fd8d66c0340f2f8a4 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 13 Oct 2021 17:42:55 +0900 Subject: [PATCH 1/4] Make CFS error and fail the job --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29cbdd2d37..128ae8f409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,9 +79,12 @@ jobs: run: | # TODO: Add ignore filters and GitHub Workflow Command Reporting in CFS. That way we don't have to do this workaround. # FIXME: Suppress warnings from templates project - dotnet codefilesanity | while read -r line; do - echo "::warning::$line" - done + exit_code=0 + while read -r line; do + echo "::error::$line" + exit_code=1 + done <<< $(dotnet codefilesanity) + exit $exit_code # Temporarily disabled due to test failures, but it won't work anyway until the tool is upgraded. # - name: .NET Format (Dry Run) From e12249f1270a22cf5811a8bb7a9ee44f2c0250db Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 13 Oct 2021 17:56:33 +0900 Subject: [PATCH 2/4] Exclude empty lines --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 128ae8f409..0da1f9636b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,8 +81,10 @@ jobs: # FIXME: Suppress warnings from templates project exit_code=0 while read -r line; do + if [[ ! -z "$line" ]]; then echo "::error::$line" exit_code=1 + fi done <<< $(dotnet codefilesanity) exit $exit_code From 6d1b9be7fd4d5a482ac04dd9f01e0fe051bde2ff Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 13 Oct 2021 17:56:56 +0900 Subject: [PATCH 3/4] Test CFS failure --- osu.Game/OsuGame.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 020cdebab6..1c277a3bd7 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -1,6 +1,3 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - using System; using System.Collections.Generic; using System.Diagnostics; From 08bbdc70fc96a26832911db0a133c46ca289d2cf Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 13 Oct 2021 17:57:09 +0900 Subject: [PATCH 4/4] Revert "Test CFS failure" This reverts commit 6d1b9be7fd4d5a482ac04dd9f01e0fe051bde2ff. --- osu.Game/OsuGame.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 1c277a3bd7..020cdebab6 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -1,3 +1,6 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + using System; using System.Collections.Generic; using System.Diagnostics;