Closed
Description
Welcome
- Yes, I've searched similar issues on GitHub and didn't find any.
- I agree to follow this project's Code of Conduct
Your feature request related to a problem? Please describe
Various tools like action-junit-report rely on the file
and line
testcase attributes in order to report errors nicely inline the file.
file
and line
testcase attributse are also part of the Common JUnit XML Format:
https://github.com/testmoapp/junitxml?tab=readme-ov-file#complete-junit-xml-example
It'd be nice to include that information in golangci-lint reports as well.
Describe the solution you'd like
Include file
and line
testcase attributes like so:
<testsuites>
<testsuite name="go/internal/pkg/set/set_test.go" tests="1" errors="0" failures="1">
<testcase name="unused" classname="go/internal/pkg/set/set_test.go:15:6" file="go/internal/pkg/set/set_test.go" line="15">
<failure message="go/internal/pkg/set/set_test.go:15:6: func `unused` is unused" type=""><![CDATA[: func `unused` is unused
Category: unused
File: go/internal/pkg/set/set_test.go
Line: 15
Details: func unused(t *testing.T) {]]></failure>
</testcase>
</testsuite>
</testsuites>
Describe alternatives you've considered
Parsing the file and line number from the classname is too brittle.
Additional context
No response
Supporter
- I am a sponsor through GitHub or OpenCollective