rspec/rules/S5979/java/comments-and-links.adoc

36 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=== on 4 Sep 2020, 17:14:44 Nicolas Harraudeau wrote:
Note that this is a low priority rule as tests would fail if this bug is present. It can however be useful for SonarLint users as they will be able to see their mistake more rapidly. It won't add much value for SonarQube/SonarCloud users.
=== on 15 Mar 2021, 23:23:53 Nicolas Coquelet wrote:
Hi,
This rule throw a false positive on test class annotated with @MockitoSettings.
The official documentation describe that if we use @MockitoSettings annotation to configure Mockito behaviour, we can avoid @ExtendWith(MockitoExtension.class) annotation
Here the official documentation link
https://www.javadoc.io/static/org.mockito/mockito-junit-jupiter/3.8.0/org/mockito/junit/jupiter/MockitoExtension.html
 
=== on 17 Mar 2021, 12:05:23 Quentin Jaquier wrote:
Hello [~ncoquelet]
First, let me just warn you that commenting on a closed ticket (SONARJAVA-3606) or directly in the RSPEC description is not the best way to get attention as nobody is actively monitoring these places, it is too easy to get unnoticed. The recommended way to go is the https://community.sonarsource.com/[community forum].
As long as I am here, let me answer your question here anyway:
What you suggest makes sense to me, and in fact, we recently created SONARJAVA-3734. Since the annotation you are talking about is itself a meta-annotation annotated with ``++@ExtendWith(value=MockitoExtension.class)++``, this ticket should solve your concern as well. I added a point in the description to make sure we test this.
Have a great day,
Quentin