Merged
Conversation
Generated by 🚫 Danger |
SimplyDanny
requested changes
Jan 27, 2023
Collaborator
SimplyDanny
left a comment
There was a problem hiding this comment.
Only some small remarks ...
| violations.map({ testCase(for: $0) }).joined(), | ||
| "\n\t</testsuite>\n", | ||
| "</testsuites>" | ||
| ].joined() |
Collaborator
There was a problem hiding this comment.
Can we use a text block instead?
Contributor
Author
There was a problem hiding this comment.
Would be also possible, but I did it this way, because CheckstyleReporter, GitHubActionsLoggingReporter, GitLabJUnitReporter, HTMLReporter and XcodeReporter also used this style.
Should I change it anyway?
Collaborator
There was a problem hiding this comment.
Fine for now. Let me refactor them in a follow-up.
| <failure message='Colons should be next to the identifier when specifying a type and next to the key in dictionary literals'>Error:Line:0</failure> | ||
| </testcase> | ||
| </testsuite> | ||
| </testsuites> No newline at end of file |
CHANGELOG.md
Outdated
| [SimplyDanny](https://github.com/SimplyDanny) | ||
| [#4121](https://github.com/realm/SwiftLint/issues/4121) | ||
|
|
||
| * Updated JUnit reporter to output error count and warning count. |
Collaborator
There was a problem hiding this comment.
Make sure to end the line with two spaces:
Suggested change
| * Updated JUnit reporter to output error count and warning count. | |
| * Updated JUnit reporter to output error count and warning count. |
|
|
||
| return [ | ||
| "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", | ||
| "<testsuites failures=\"\(warningCount)\" errors=\"\(errorCount)\">\n", |
Collaborator
There was a problem hiding this comment.
Warnings are failures? Is that right?
SimplyDanny
approved these changes
Jan 30, 2023
Collaborator
|
Thank you @patricks! |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some JUnit XML parsers require, that the warnings and errors count is set per test suite. Bitbucket Pipelines require this otherwise the errors / warnings are not recognized. I updated to code that these values are also provided. Another important value would be the total tests count (successful count + warnings count + errors count). But I couldn't figure out an easy way to get this value. I also update the format of the output.
Previous generated file output format:
New file output format: