1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-17 20:57:58 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {