Skip to content

Commit

Permalink
refactor: code duplication in SupportedScalaVersions (#6511)
Browse files Browse the repository at this point in the history
A tiny change to try contributing to Metals
Code tested by running it locally
  • Loading branch information
buzbohdan authored Jun 17, 2024
1 parent 51eba99 commit e8f3c9f
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,11 @@ abstract class SupportedScalaVersions {
metalsVersion: String,
timeout: FiniteDuration,
) = {
if (metalsVersion.contains("SNAPSHOT")) {
supportedInMetals(
"https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/",
metalsVersion,
timeout,
)
} else {
supportedInMetals(
"https://repo1.maven.org/maven2/org/scalameta/",
metalsVersion,
timeout,
)
}
val url =
if (metalsVersion.contains("SNAPSHOT"))
"https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/"
else "https://repo1.maven.org/maven2/org/scalameta/"
supportedInMetals(url, metalsVersion, timeout)
}

private def supportedInMetals(
Expand Down

0 comments on commit e8f3c9f

Please sign in to comment.