Skip to content

Commit 01811bd

Browse files
committed
chore: fix changes related to github.com/go-xmlfmt/xmlfmt
1 parent a113414 commit 01811bd

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

go.mod

+1-2
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ require (
170170
github.com/spf13/jwalterweatherman v1.1.0 // indirect
171171
github.com/stretchr/objx v0.5.0 // indirect
172172
github.com/subosito/gotenv v1.4.1 // indirect
173+
github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect
173174
github.com/tklauser/go-sysconf v0.3.11 // indirect
174175
github.com/tklauser/numcpus v0.6.0 // indirect
175176
github.com/valyala/bytebufferpool v1.0.0 // indirect
@@ -188,5 +189,3 @@ require (
188189
gopkg.in/yaml.v2 v2.4.0 // indirect
189190
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
190191
)
191-
192-
require github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect

pkg/printers/checkstyle_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
//nolint:dupl
21
package printers
32

43
import (
54
"bytes"
65
"context"
76
"go/token"
7+
"strings"
88
"testing"
99

1010
"github.com/stretchr/testify/assert"
@@ -51,7 +51,7 @@ func TestCheckstyle_Print(t *testing.T) {
5151
require.NoError(t, err)
5252

5353
//nolint:lll
54-
expected := "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\r\n<checkstyle version=\"5.0\">\r\n <file name=\"path/to/filea.go\">\r\n <error column=\"4\" line=\"10\" message=\"some issue\" severity=\"warning\" source=\"linter-a\">\r\n </error>\r\n </file>\r\n <file name=\"path/to/fileb.go\">\r\n <error column=\"9\" line=\"300\" message=\"another issue\" severity=\"error\" source=\"linter-b\">\r\n </error>\r\n </file>\r\n</checkstyle>\n"
54+
expected := "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<checkstyle version=\"5.0\">\n <file name=\"path/to/filea.go\">\n <error column=\"4\" line=\"10\" message=\"some issue\" severity=\"warning\" source=\"linter-a\"></error>\n </file>\n <file name=\"path/to/fileb.go\">\n <error column=\"9\" line=\"300\" message=\"another issue\" severity=\"error\" source=\"linter-b\"></error>\n </file>\n</checkstyle>\n"
5555

56-
assert.Equal(t, expected, buf.String())
56+
assert.Equal(t, expected, strings.ReplaceAll(buf.String(), "\r", ""))
5757
}

0 commit comments

Comments
 (0)