Skip to content

Update all tests to use text blocks #4153

Update all tests to use text blocks

Update all tests to use text blocks #4153

Triggered via pull request December 26, 2024 14:29
Status Success
Total duration 4m 5s
Artifacts

codeql.yml

on: pull_request
Matrix: analyze
Fit to window
Zoom out
Zoom in

Annotations

24 warnings
A change can be made to line 72 without causing a test to fail: error-prone-utils/src/main/java/tech/picnic/errorprone/utils/SourceCode.java#L72
removed conditional - replaced equality check with true (covered by 1 tests RemoveConditionalMutator_EQUAL_IF)
A change can be made to line 137 without causing a test to fail: error-prone-utils/src/main/java/tech/picnic/errorprone/utils/SourceCode.java#L137
replaced return value with Optional.empty for joinConstantSourceCodeLines (no tests cover this line EmptyObjectReturnValsMutator)
2 different changes can be made to line 125 without causing a test to fail: error-prone-utils/src/main/java/tech/picnic/errorprone/utils/SourceCode.java#L125
removed conditional - replaced equality check with false (no tests cover this line RemoveConditionalMutator_EQUAL_ELSE) removed conditional - replaced equality check with true (no tests cover this line RemoveConditionalMutator_EQUAL_IF)
A change can be made to line 66 without causing a test to fail: error-prone-utils/src/main/java/tech/picnic/errorprone/utils/SourceCode.java#L66
removed conditional - replaced equality check with false (covered by 1 tests RemoveConditionalMutator_EQUAL_ELSE)
2 different changes can be made to line 130 without causing a test to fail: error-prone-utils/src/main/java/tech/picnic/errorprone/utils/SourceCode.java#L130
removed conditional - replaced equality check with false (no tests cover this line RemoveConditionalMutator_EQUAL_ELSE) removed conditional - replaced equality check with true (no tests cover this line RemoveConditionalMutator_EQUAL_IF)
A change can be made to a lambda on line 245 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L245
replaced return value with Optional.empty for 2nd lambda in suggestTextBlockIndentation (covered by 2 tests EmptyObjectReturnValsMutator)
A change can be made to a lambda on line 242 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L242
replaced return value with Optional.empty for 1st lambda in suggestTextBlockIndentation (covered by 2 tests EmptyObjectReturnValsMutator)
2 different changes can be made to line 257 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L257
changed conditional boundary (covered by 2 tests ConditionalsBoundaryMutator) removed conditional - replaced comparison check with false (covered by 2 tests RemoveConditionalMutator_ORDER_ELSE)
A change can be made to line 183 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L183
removed conditional - replaced equality check with true (covered by 4 tests RemoveConditionalMutator_EQUAL_IF)
2 different changes can be made to a lambda on line 207 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L207
replaced boolean return with false for 1st lambda in canUseTextBlocks (no tests cover this line BooleanFalseReturnValsMutator) replaced boolean return with true for 1st lambda in canUseTextBlocks (no tests cover this line BooleanTrueReturnValsMutator)
A change can be made to line 185 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L185
removed conditional - replaced equality check with true (covered by 4 tests RemoveConditionalMutator_EQUAL_IF)
A change can be made to line 173 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L173
removed conditional - replaced equality check with true (covered by 4 tests RemoveConditionalMutator_EQUAL_IF)
2 different changes can be made to line 252 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L252
removed conditional - replaced equality check with false (covered by 2 tests RemoveConditionalMutator_EQUAL_ELSE) removed conditional - replaced equality check with true (covered by 2 tests RemoveConditionalMutator_EQUAL_IF)
A change can be made to line 165 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L165
removed conditional - replaced equality check with true (covered by 4 tests RemoveConditionalMutator_EQUAL_IF)
2 different changes can be made to line 220 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L220
removed call to replace (covered by 2 tests RemoveChainedCallsMutator) swapped parameters 1 and 2 in call to replace (covered by 2 tests ParamSwapMutator)
2 different changes can be made to line 221 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L221
removed call to replace (covered by 2 tests RemoveChainedCallsMutator) swapped parameters 1 and 2 in call to replace (covered by 2 tests ParamSwapMutator)
A change can be made to line 237 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L237
replaced return value with "" for suggestTextBlockIndentation (no tests cover this line EmptyObjectReturnValsMutator)
2 different changes can be made to line 236 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L236
removed conditional - replaced equality check with false (covered by 2 tests RemoveConditionalMutator_EQUAL_ELSE) removed conditional - replaced equality check with true (covered by 2 tests RemoveConditionalMutator_EQUAL_IF)
A change can be made to line 199 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L199
removed conditional - replaced comparison check with true (covered by 2 tests RemoveConditionalMutator_ORDER_IF)
A change can be made to line 207 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L207
removed conditional - replaced equality check with false (no tests cover this line RemoveConditionalMutator_EQUAL_ELSE)
2 different changes can be made to line 206 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L206
removed conditional - replaced equality check with false (no tests cover this line RemoveConditionalMutator_EQUAL_ELSE) removed conditional - replaced equality check with true (no tests cover this line RemoveConditionalMutator_EQUAL_IF)
2 different changes can be made to line 261 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L261
removed call to substring (covered by 2 tests RemoveChainedCallsMutator) replaced return value with Optional.empty for getIndentation (covered by 2 tests EmptyObjectReturnValsMutator)
A change can be made to line 205 without causing a test to fail: error-prone-guidelines/src/main/java/tech/picnic/errorprone/guidelines/bugpatterns/TestHelperSourceFormat.java#L205
removed conditional - replaced equality check with false (covered by 2 tests RemoveConditionalMutator_EQUAL_ELSE)