Extend match_array danger rule with more use-cases
Context
Closes #381702 (closed)
The following code is currently caught by Danger:
# Will suggest to use `match_array`
expect(foo).to match(['bar'])
# Will suggest to use `match_array`
expect(foo).to match([
'bar3'
])
Not the following code:
# Will not suggest to use `match_array`
expect(foo).to match(
['bar']
)
This caused a master-broken incident recently.
What does this MR do?
Ensures that Danger catches those use-cases.
Screenshots or screen recordings
Before
After
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by David Dieulivol