Skip to content

Commit b1bba14

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"bytes"
66
"context"
77
"go/token"
8+
"strings"
89
"testing"
910

1011
"github.com/stretchr/testify/assert"
@@ -51,7 +52,7 @@ func TestCheckstyle_Print(t *testing.T) {
5152
require.NoError(t, err)
5253

5354
//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"
55+
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"
5556

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

0 commit comments

Comments
 (0)