Repository navigation
JUnit reporter for GitLab artifact:report:junit - #3177
Merged
Merged
Conversation
Generated by 🚫 Danger |
PaulTaykalo
approved these changes
Apr 12, 2020
optionalendeavors
added a commit
to optionalendeavors/SwiftLint
that referenced
this pull request
Jul 12, 2020
* master: (101 commits) JUnit reporter for GitLab artifact:report:junit (realm#3177) Add empty changelog section release 0.39.2 Update CI to run jobs with Xcode 11.0 to 11.4 (realm#3168) Fix false positives in valid_ibinspectable rule when using Swift 5.2 (realm#3155) Fix attributes rule false positive with Swift 5.2 (realm#3154) Fix CHANGELOG link Fix false positives in redundant_objc_attribute with Swift 5.2 (realm#3152) Fix false positives on implicit_getter with Swift 5.2+ (realm#3151) Simplify regex (realm#3145) fix links about configuration rules (realm#3142) Add unused_import config options to require imports for each module used (realm#3123) Add empty changelog section release 0.39.1 Temporarily remove all SwiftSyntax rules and support (realm#3107) Fix unused_import rule reported locations and corrections (realm#3106) release 0.39.0 Fix false positive in `empty_string` rule with multiline literals (realm#3101) Fix PrivateActionRule in Swift 5.2 (realm#3092) Fix false positive in implicit_getter with Swift 5.2 (realm#3099) ... # Conflicts: # Source/SwiftLintFramework/Extensions/SwiftLintFile+Regex.swift
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.
When I found out that GitLab provides a nice representation of JUnit reports and SwiftLint can generate JUnit report, I tried to use that but the result (for 7 failures) looked like that:
Not only it joined 7 issues into 1 because
classname&namecombination is not unique, but it don't give much details on why and where this issue is.So I created a new JUnit formatter which would give much better result:
I decided to create a new reporter instead of existing one because JUnit format GitLab supports is not compliant with JUnit format specifications and might break already configured CI set-ups with, for example, Jenkins.
Test file: https://gitlab.com/krin-san/swiftlint-gitlabreporter/-/blob/master/main.swift
JUnit reporter results: https://gitlab.com/krin-san/swiftlint-gitlabreporter/-/merge_requests/2
GitLab reporter results: https://gitlab.com/krin-san/swiftlint-gitlabreporter/-/merge_requests/3
I plan to improve that reporter even more, when GitLab release new update related to junit artifacts. E.g.: