2025 init

This commit is contained in:
Romain Lefeuvre
2025-11-18 14:43:08 +01:00
commit 7155dd77be
39 changed files with 1134 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# UnnecessaryBooleanAssertion
*Usage:*
`pmd check -d <source code folder> -R category/java/errorprone.xml/UnnecessaryBooleanAssertion -format <output format>`
*Description:*
A JUnit test assertion with a boolean literal is unnecessary since it always will evaluate to the same thing.
Consider using flow control (in case of assertTrue(false) or similar) or simply removing
statements like assertTrue(true) and assertFalse(false). If you just want a test to halt after finding
an error, use the fail() method and provide an indication message of why it did.
*Example:*
```java
public class SimpleTest extends TestCase {
public void testX() {
assertTrue(true); // serves no real purpose
}
}
```