rspec/rules/S2970/comments-and-links.adoc

46 lines
1.6 KiB
Plaintext
Raw Permalink 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.

=== is duplicated by: S2858
=== on 22 May 2015, 15:49:59 Ann Campbell wrote:
Thanks for this nearly-complete "stub", [~massimo.paladin].
Now I'm going to ask you to work some more :-)
Could you add a code snipped to illustrated the exception? I don't quite understand it as-is, and I'm afraid others won't either.
=== on 26 May 2015, 12:22:21 Massimo PALADIN wrote:
\[~ann.campbell.2] I added a code snippet to the exceptions section, back to you for verification.
=== on 26 May 2015, 14:00:08 Ann Campbell wrote:
This looks great [~massimo.paladin], thanks!
=== on 29 May 2015, 12:12:20 Dinesh Bolkensteyn wrote:
\[~ann.campbell.2] I'm increasing the severity to CRITICAL with the agreement of [~mpaladin]: These issues must be fixed immediately - else you might ship broken code
=== on 29 May 2015, 12:15:21 Ann Campbell wrote:
Okay [~dinesh.bolkensteyn].
=== on 19 Mar 2019, 16:29:04 Jeffrey Naisbitt wrote:
This rule appears to have a bug/false-positive when using AssertJ's SoftAssertion feature.  AssertJ has a static method (SoftAssertions.assertSoftly) that calls assertAll() after its soft assertions.  Therefore, this case should not trigger the rule violation indicating 'assertAll' is needed:
 
----
import org.assertj.core.api.SoftAssertions;
import org.junit.Test;
public class Rule2970 {
@Test
public void test() {
SoftAssertions.assertSoftly(softly -> {
softly.assertThat(true).isTrue();
softly.assertThat(false).isFalse();
});
} // False-positive here: squid:S2970: "Add a call to 'assertAll' after all 'assertThat'."
}
----