From 9eef164d9cdaec0456f24b1e268fe61520bafe27 Mon Sep 17 00:00:00 2001 From: Donal Byrne Date: Tue, 4 Jan 2022 11:43:39 +0100 Subject: [PATCH] Added file and line to both message and content of junit tag --- pkg/printers/junitxml.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/printers/junitxml.go b/pkg/printers/junitxml.go index 2b03270e10d0..dc22ddfc4ffc 100644 --- a/pkg/printers/junitxml.go +++ b/pkg/printers/junitxml.go @@ -57,8 +57,8 @@ func (p JunitXML) Print(ctx context.Context, issues []result.Issue) error { Name: i.FromLinter, ClassName: i.Pos.String(), Failure: failureXML{ - Message: i.Text, - Content: i.Text + ":\n" + strings.Join(i.SourceLines, "\n"), + Message: i.Pos.String() + ": " + i.Text, + Content: i.Pos.String() + ": " + i.Text + "\n" + strings.Join(i.SourceLines, "\n"), }, }