Skip to content

Commit 265eec4

Browse files
committed
Apply Spotless formatting fixes to TestUtil.java
modified: src/test/java/com/github/copilot/sdk/TestUtil.java - Reflow Javadoc line wrapping to comply with Eclipse formatter rules - Collapse multi-line ProcessBuilder chain to single line per Spotless Signed-off-by: Ed Burns <edburns@microsoft.com>
1 parent 5ba95f6 commit 265eec4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/test/java/com/github/copilot/sdk/TestUtil.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ private TestUtil() {
2222
* <p>
2323
* Resolution order:
2424
* <ol>
25-
* <li>Search the system PATH using {@code where.exe} (Windows) or
26-
* {@code which} (Linux/macOS).</li>
25+
* <li>Search the system PATH using {@code where.exe} (Windows) or {@code which}
26+
* (Linux/macOS).</li>
2727
* <li>Fall back to the {@code COPILOT_CLI_PATH} environment variable.</li>
2828
* <li>Walk parent directories looking for
2929
* {@code nodejs/node_modules/@github/copilot/index.js}.</li>
@@ -66,11 +66,11 @@ static String findCliPath() {
6666
/**
6767
* Searches the system PATH for a launchable {@code copilot} executable.
6868
* <p>
69-
* Uses {@code where.exe} on Windows and {@code which} on Unix-like systems.
70-
* On Windows, {@code where.exe} may return multiple results (e.g. a Linux ELF
69+
* Uses {@code where.exe} on Windows and {@code which} on Unix-like systems. On
70+
* Windows, {@code where.exe} may return multiple results (e.g. a Linux ELF
7171
* binary, a {@code .bat} wrapper, a {@code .cmd} wrapper). This method iterates
72-
* all results and returns the first one that {@link ProcessBuilder} can actually
73-
* start.
72+
* all results and returns the first one that {@link ProcessBuilder} can
73+
* actually start.
7474
*/
7575
private static String findCopilotInPath() {
7676
try {
@@ -86,8 +86,7 @@ private static String findCopilotInPath() {
8686
var lines = reader.lines().map(String::trim).filter(l -> !l.isEmpty()).toList();
8787
for (String candidate : lines) {
8888
try {
89-
new ProcessBuilder(candidate, "--version")
90-
.redirectErrorStream(true).start().destroyForcibly();
89+
new ProcessBuilder(candidate, "--version").redirectErrorStream(true).start().destroyForcibly();
9190
return candidate;
9291
} catch (Exception launchFailed) {
9392
// Not launchable on this platform — try next candidate

0 commit comments

Comments
 (0)