Skip to content

Commit 4121cf6

Browse files
Add another example to test samples to increase coverage
1 parent de6f209 commit 4121cf6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

java-checks-test-sources/default/src/main/java/checks/ReadlnWithPromptCheckSample.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
public class ReadlnWithPromptCheckSample {
44

5+
private static final String text = IO.readln("Enter your name: "); // Compliant
6+
57
void nonCompliant() {
68
IO.print("Enter your name: ");
79
String name = IO.readln(); // Noncompliant {{Use "IO.readln(prompt)" instead of separate "IO.print(prompt)" and "IO.readln()" calls.}}

0 commit comments

Comments
 (0)