1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-25 22:12:38 +02:00

fix:ignore color marks when compare stings in test (#926)

This commit is contained in:
Marcin Federowicz
2023-10-29 07:43:52 +01:00
committed by GitHub
parent bcae8c78ca
commit 25ae73a67a

View File

@@ -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 {