Danger crashes if multiple inline comments have same severity, file and line number
- Dominant language
- Ruby
- Stars
- 5.7k
- Forks
- 488
- PR merge metrics
- No merged PRs in 30d
Description
# Report
## What did you do?
While implementing support for [SwiftFormat plugin's inline_mode](https://github.com/garriguv/danger-ruby-swiftformat/pull/45), 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
```ruby
swiftlint.lint_files(fail_on_error: true, inline_mode: true, additional_swiftlint_args: '--strict')
swiftformat.check_format(fail_on_error: true, inline_mode: true)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.