Update .scalafmt.conf. re-format

This commit is contained in:
xuwei-k 2024-09-07 16:37:49 +09:00
parent 2dabe7ba18
commit 7279f659e0
3 changed files with 15 additions and 13 deletions

View File

@ -23,9 +23,3 @@ align.openParenDefnSite = false
danglingParentheses.preset = true danglingParentheses.preset = true
trailingCommas = preserve trailingCommas = preserve
# TODO update scalafmt and enable Scala 3
project.excludeFilters = [
"internal/util-position/src/main/scala-3/sbt/internal/util/SourcePositionMacro.scala",
"main-settings/src/main/scala/sbt/Def.scala",
]

View File

@ -11,7 +11,8 @@ import scala.quoted.{ Expr, Quotes, quotes }
abstract class SourcePositionImpl { abstract class SourcePositionImpl {
/** Creates a SourcePosition by using the enclosing position of the invocation of this method. /**
* Creates a SourcePosition by using the enclosing position of the invocation of this method.
* *
* @return SourcePosition * @return SourcePosition
*/ */
@ -26,8 +27,8 @@ object SourcePositionImpl {
'{ '{
LinePosition( LinePosition(
path = ${Expr(x.sourceFile.name)}, path = ${ Expr(x.sourceFile.name) },
startLine = ${Expr(x.startLine + 1)} startLine = ${ Expr(x.startLine + 1) }
) )
} }
} }

View File

@ -16,7 +16,13 @@ import sbt.Scope.{ GlobalScope, ThisScope }
import sbt.internal.util.Types.const import sbt.internal.util.Types.const
import sbt.internal.util.complete.Parser import sbt.internal.util.complete.Parser
import sbt.internal.util.{ Terminal => ITerminal, * } import sbt.internal.util.{ Terminal => ITerminal, * }
import sbt.util.{ ActionCacheStore, AggregateActionCacheStore, BuildWideCacheConfiguration, cacheLevel , DiskActionCacheStore } import sbt.util.{
ActionCacheStore,
AggregateActionCacheStore,
BuildWideCacheConfiguration,
cacheLevel,
DiskActionCacheStore
}
import Util._ import Util._
import sbt.util.Show import sbt.util.Show
import xsbti.{ HashedVirtualFileRef, VirtualFile, VirtualFileRef } import xsbti.{ HashedVirtualFileRef, VirtualFile, VirtualFileRef }
@ -426,9 +432,10 @@ object Def extends Init[Scope] with TaskMacroExtra with InitializeImplicits:
private[sbt] def dummyTask[T](name: String): Task[T] = { private[sbt] def dummyTask[T](name: String): Task[T] = {
import TaskExtra.toTaskInfo import TaskExtra.toTaskInfo
val base: Task[T] = TaskExtra.task( val base: Task[T] = TaskExtra
sys.error(s"Dummy task '$name' did not get converted to a full task.") .task(
) sys.error(s"Dummy task '$name' did not get converted to a full task.")
)
.named(name) .named(name)
base.copy(info = base.info.set(isDummyTask, true)) base.copy(info = base.info.set(isDummyTask, true))
} }