-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #345 from scala-steward/update/scalafmt-core-3.7.9
Update scalafmt-core to 3.7.9
- Loading branch information
Showing
22 changed files
with
146 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Scala Steward: Reformat with scalafmt 3.1.2 | ||
fb6cfb8aea15a1b339e3ed69e1e96acd7df4cae6 | ||
|
||
# Scala Steward: Reformat with scalafmt 3.7.9 | ||
13ec28ec9e96c5649717916965db38aa925c315f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
runner.dialect = scala212source3 | ||
version = "3.7.5" | ||
version = "3.7.9" | ||
maxColumn = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ import Keys._ | |
* 杨博 (Yang Bo) <[email protected]> | ||
*/ | ||
object GithubActionsDocTitle extends AutoPlugin { | ||
override def requires: Plugins = GithubActionsEnvironmentVariables && JvmPlugin | ||
override def requires: Plugins = | ||
GithubActionsEnvironmentVariables && JvmPlugin | ||
|
||
override def trigger: PluginTrigger = allRequirements | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ import Ordering.Implicits._ | |
* 杨博 (Yang Bo) <[email protected]> | ||
*/ | ||
object GithubActionsScaladocSourceUrl extends AutoPlugin { | ||
override def requires: Plugins = GithubActionsEnvironmentVariables && GitPlugin | ||
override def requires: Plugins = | ||
GithubActionsEnvironmentVariables && GitPlugin | ||
|
||
override def trigger: PluginTrigger = allRequirements | ||
|
||
|
@@ -22,7 +23,10 @@ object GithubActionsScaladocSourceUrl extends AutoPlugin { | |
case Some(rootDirectory) => | ||
originalScalacOptions.indexOf("-sourcepath") match { | ||
case -1 => | ||
originalScalacOptions ++ Seq("-sourcepath", rootDirectory.toString) | ||
originalScalacOptions ++ Seq( | ||
"-sourcepath", | ||
rootDirectory.toString | ||
) | ||
case i => | ||
originalScalacOptions.updated(i + 1, rootDirectory.toString) | ||
} | ||
|
@@ -35,21 +39,26 @@ object GithubActionsScaladocSourceUrl extends AutoPlugin { | |
}, | ||
scalacOptions in Compile in doc := { | ||
val originalScalacOptions = (scalacOptions in Compile in doc).value | ||
(GitPlugin.gitRepositoryBuilder.?.value, GithubActionsEnvironmentVariables.githubRepository.?.value) match { | ||
( | ||
GitPlugin.gitRepositoryBuilder.?.value, | ||
GithubActionsEnvironmentVariables.githubRepository.?.value | ||
) match { | ||
case (Some(repositoryBuilder), Some(slug)) => | ||
val repository = repositoryBuilder.build() | ||
try { | ||
val hash = repository.resolve(Constants.HEAD).name | ||
if (VersionNumber(scalaVersion.value).numbers < Seq(3L)) { | ||
val sourceUrl = raw"https://github.com/$slug/blob/${hash}€{FILE_PATH}.scala" | ||
val sourceUrl = | ||
raw"https://github.com/$slug/blob/${hash}€{FILE_PATH}.scala" | ||
originalScalacOptions.indexOf("-doc-source-url") match { | ||
case -1 => | ||
originalScalacOptions ++ Seq("-doc-source-url", sourceUrl) | ||
case i => | ||
originalScalacOptions.updated(i + 1, sourceUrl) | ||
} | ||
} else { | ||
val pathPrefix = GitPlugin.gitWorkTree.value.fold("")(_.toString()) | ||
val pathPrefix = | ||
GitPlugin.gitWorkTree.value.fold("")(_.toString()) | ||
originalScalacOptions :+ raw"-source-links:$pathPrefix=github://$slug/$hash" | ||
} | ||
} finally { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.