Skip to content

Commit f941ff8

Browse files
committed
Apply scalafmt
1 parent 1a3cac8 commit f941ff8

3 files changed

Lines changed: 18 additions & 17 deletions

File tree

scip-java/src/main/scala/com/sourcegraph/scip_java/Embedded.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ object Embedded {
2828

2929
private def javacErrorpath(tmp: Path) = tmp.resolve("errorpath.txt")
3030

31-
def customJavac(
32-
sourceroot: Path,
33-
targetroot: Path,
34-
tmp: Path
35-
): Path = {
31+
def customJavac(sourceroot: Path, targetroot: Path, tmp: Path): Path = {
3632
val bin = tmp.resolve("bin")
3733
val javac = bin.resolve("javac")
3834
val java = bin.resolve("java")

scip-java/src/main/scala/com/sourcegraph/scip_java/ScipPrinters.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ object ScipPrinters {
2121

2222
// Snapshot comment prefix for each rendered file extension. Languages not
2323
// listed fall back to `//`.
24-
private val commentSyntaxByExtension: Map[String, String] =
25-
Map("py" -> "#", "sql" -> "--", "yaml" -> "#", "yml" -> "#")
24+
private val commentSyntaxByExtension: Map[String, String] = Map(
25+
"py" -> "#",
26+
"sql" -> "--",
27+
"yaml" -> "#",
28+
"yml" -> "#"
29+
)
2630

2731
def printTextDocument(doc: Document, text: String): String = {
2832
val out = new mutable.StringBuilder()

scip-java/src/main/scala/com/sourcegraph/scip_java/buildtools/GradleBuildTool.scala

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,17 @@ class GradleBuildTool(index: IndexCommand) extends BuildTool("Gradle", index) {
6969
}
7070

7171
private def containsFileWithSuffix(root: Path, suffix: String): Boolean =
72-
Files.isDirectory(root) && Try {
73-
val stream = Files.find(
74-
root,
75-
Integer.MAX_VALUE,
76-
(p, attrs) =>
77-
attrs.isRegularFile && p.getFileName.toString.endsWith(suffix)
78-
)
79-
try stream.findFirst().isPresent
80-
finally stream.close()
81-
}.getOrElse(false)
72+
Files.isDirectory(root) &&
73+
Try {
74+
val stream = Files.find(
75+
root,
76+
Integer.MAX_VALUE,
77+
(p, attrs) =>
78+
attrs.isRegularFile && p.getFileName.toString.endsWith(suffix)
79+
)
80+
try stream.findFirst().isPresent
81+
finally stream.close()
82+
}.getOrElse(false)
8283

8384
def targetroot: Path = index.finalTargetroot(defaultTargetroot)
8485

0 commit comments

Comments
 (0)