From 25ae73a67a9830c7e5cfc912d6db0186c178953b Mon Sep 17 00:00:00 2001 From: Marcin Federowicz Date: Sun, 29 Oct 2023 07:43:52 +0100 Subject: [PATCH] fix:ignore color marks when compare stings in test (#926) --- revivelib/core_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/revivelib/core_test.go b/revivelib/core_test.go index 9dd1505..3e401f6 100644 --- a/revivelib/core_test.go +++ b/revivelib/core_test.go @@ -4,6 +4,7 @@ import ( "strings" "testing" + "github.com/fatih/color" "github.com/mgechev/revive/config" "github.com/mgechev/revive/lint" "github.com/mgechev/revive/revivelib" @@ -45,6 +46,7 @@ func TestReviveFormat(t *testing.T) { } // ACT + color.NoColor = true failures, exitCode, err := revive.Format("stylish", failuresChan) // ASSERT if err != nil {