You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing support for SwiftFormat plugin's inline_mode, I noticed that if multiple plugins are trying to add inline_comment with the same severity to the same file and line, danger crashes with lib/danger/request_sources/bitbucket_server.rb:158:in 'sort': comparison of Danger::Violation with Danger::Violation failed (ArgumentError).
Github seems to have the same sort.
The text was updated successfully, but these errors were encountered:
pahnev
changed the title
Inline comment crashes if multiple
Inline comment crashes if multiple comments have same severity, file and line number
Oct 25, 2021
pahnev
changed the title
Inline comment crashes if multiple comments have same severity, file and line number
Danger crashes if multiple inline comments have same severity, file and line number
Oct 25, 2021
Results:
Errors:
- [ ] Path/To/File/ActivationTokenTests.swift#L11: warning: (consecutiveBlankLines) Replace consecutive blank lines with a single blank line. `ActivationTokenTests.swift:11`
- [ ] SwiftFormat found issues
Warnings:
- [ ] Path/To/File/ActivationTokenTests.swift#L12: Limit vertical whitespace to a single empty line. Currently 3.
`vertical_whitespace` `ActivationTokenTests.swift:12`
And if I make the SwiftLint elevate the message to an error: swiftlint.lint_files(fail_on_error: true, inline_mode: true, additional_swiftlint_args: '--strict')
it results in a crash I mentioned above.
Both Swiftformat and SwiftLint work with the desired command alone, but not together.
Report
What did you do?
While implementing support for SwiftFormat plugin's inline_mode, I noticed that if multiple plugins are trying to add inline_comment with the same severity to the same file and line, danger crashes with
lib/danger/request_sources/bitbucket_server.rb:158:in 'sort': comparison of Danger::Violation with Danger::Violation failed (ArgumentError)
.Github seems to have the same sort.
https://github.com/danger/danger/blob/master/lib/danger/request_sources/bitbucket_server.rb#L158
What did you expect to happen?
Expected danger not to crash, and all comments to be sorted out in any order.
What happened instead?
💥
Your Environment
Dangerfile
The text was updated successfully, but these errors were encountered: