Skip to content

Commit 8d433f7

Browse files
xerial-botxerial
andauthored
Update scalafmt-core to 3.7.15 (#3254)
## About this PR πŸ“¦ Updates [org.scalameta:scalafmt-core](https://github.com/scalameta/scalafmt) from `3.7.14` to `3.7.15` πŸ“œ [GitHub Release Notes](https://github.com/scalameta/scalafmt/releases/tag/v3.7.15) - [Version Diff](scalameta/scalafmt@v3.7.14...v3.7.15) ## Usage βœ… **Please merge!** I'll automatically update this PR to resolve conflicts as long as you don't change it yourself. If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below. Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/scala-steward-org/scala-steward/blob/b83aae55d9dd000548c3b3c9b63d79636e7b3c8b/docs/repo-specific-configuration.md) file. _Have a fantastic day writing Scala!_ <details> <summary>βš™ Adjust future updates</summary> Add this to your `.scala-steward.conf` file to ignore future updates of this dependency: ``` updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ] ``` Or, add this to slow down future updates of this dependency: ``` dependencyOverrides = [{ pullRequests = { frequency = "30 days" }, dependency = { groupId = "org.scalameta", artifactId = "scalafmt-core" } }] ``` </details> <sup> labels: library-update </sup> --------- Co-authored-by: Taro L. Saito <[email protected]>
1 parent fb7ee61 commit 8d433f7

File tree

29 files changed

+79
-73
lines changed

29 files changed

+79
-73
lines changed

β€Ž.git-blame-ignore-revs

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ fadb726e4d1855de746b61ed1bd3bb229f7e3f95
66

77
# Scala Steward: Reformat with scalafmt 3.7.5
88
6fc8adf4498d80bb3a9fcd8673b82cac985a4b00
9+
10+
# Scala Steward: Reformat with scalafmt 3.7.15
11+
378dadaf4b2e49d8db41e310e67c82e4162edc5d

β€Ž.scalafmt.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.7.14
1+
version = 3.7.15
22
project.layout = StandardConvention
33
runner.dialect = scala3
44
maxColumn = 120

β€Žairframe-dotty-test/src/main/scala/dotty/test/DITest.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dotty.test
22

33
import wvlet.log.{LogFormatter, LogLevel, LogSupport, Logger}
4-
import wvlet.airframe._
4+
import wvlet.airframe.*
55
import wvlet.airframe.surface.Surface
66

77
object DITest extends LogSupport {

β€Žairframe-dotty-test/src/main/scala/dotty/test/Surface3Test.scala

+13-14
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@ package dotty.test
22

33
import wvlet.airframe.surface.Surface
44
import wvlet.log.LogSupport
5-
import wvlet.airframe.surface.tag._
5+
import wvlet.airframe.surface.tag.*
66

77
object Surface3Test extends LogSupport {
8-
import scala.quoted._
8+
import scala.quoted.*
99

10-
inline def test(s:Surface, expected: String): Unit = {
10+
inline def test(s: Surface, expected: String): Unit = {
1111
s match {
1212
case null =>
1313
warn(s"Surface: expected: ${expected}, but null")
1414
case _ =>
1515
val str = s.toString
1616
// info(s"${s}: ${s.getClass}")
17-
if(str != expected) {
17+
if (str != expected) {
1818
warn(s"Surface: expected: ${expected}, but ${str}")
1919
}
2020
}
2121
}
2222

2323
inline def assert(v: Any, expected: Any): Unit = {
24-
if(v != expected) {
24+
if (v != expected) {
2525
warn(s"Expected: ${expected}, but ${v}")
2626
}
2727
}
2828

29-
case class Person(id:Int = -1, name:String)
29+
case class Person(id: Int = -1, name: String)
3030

31-
trait Label
31+
trait Label
3232
type MyString = String
3333

3434
trait Holder[M[_]] {
@@ -38,18 +38,18 @@ object Surface3Test extends LogSupport {
3838
trait Task[A]
3939

4040
class Hello {
41-
def hello(msg:String): String = msg
42-
private def hiddemMethod: Int = 1
41+
def hello(msg: String): String = msg
42+
private def hiddemMethod: Int = 1
4343
protected def hiddenMethod2: Option[Int] = None
4444
}
4545

4646
class HelloExt extends Hello {
4747
def hello2: String = "hello2"
4848
}
4949

50-
case class MyOpt(a:Option[String])
50+
case class MyOpt(a: Option[String])
5151

52-
def run:Unit = {
52+
def run: Unit = {
5353
test(Surface.of[Int], "Int")
5454
test(Surface.of[Boolean], "Boolean")
5555
test(Surface.of[Long], "Long")
@@ -84,7 +84,7 @@ object Surface3Test extends LogSupport {
8484
// Case class surface tests
8585
val s = Surface.of[Person]
8686
assert(s.params.mkString(","), "id:Int,name:String")
87-
val p = Person(1, "leo")
87+
val p = Person(1, "leo")
8888
val p0 = s.params(0)
8989
assert(p0.name, "id")
9090
assert(p0.getDefaultValue, Some(-1))
@@ -94,7 +94,7 @@ object Surface3Test extends LogSupport {
9494

9595
val ms = Surface.methodsOf[Hello]
9696
debug(ms)
97-
val h = new Hello
97+
val h = new Hello
9898
val res = ms(0).call(h, "hello surface")
9999
assert(res, "hello surface")
100100

@@ -109,5 +109,4 @@ object Surface3Test extends LogSupport {
109109
info(sc.params)
110110
}
111111

112-
113112
}

β€Žairframe-msgpack/src/main/scala/wvlet/airframe/msgpack/spi/MessageFormat.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ object MessageFormat {
8484
def of(code: Byte): MessageFormat = formatTable(code & 0xff)
8585

8686
/**
87-
* Converting a byte value into MessageFormat. For faster performance, use {@link #valueOf}
87+
* Converting a byte value into MessageFormat. For faster performance, use [[valueOf(byte)]] instead.
8888
*
8989
* @param b
9090
* MessageFormat of the given byte

β€Žairframe-scalatest/shared/src/main/scala/wvlet/airframe/AirframeSpec.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
package wvlet.airframe
1515

16-
import org.scalatest._
16+
import org.scalatest.*
1717
import wvlet.log.LogFormatter.SourceCodeLogFormatter
1818
import wvlet.log.{LogSupport, Logger}
1919

β€Žairspec/build.sbt

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def excludePomDependency(excludes: Seq[String]) = { node: XmlNode =>
130130
}).transform(node).head
131131
}
132132

133-
/** AirSpec build definitions.
133+
/**
134+
* AirSpec build definitions.
134135
*
135136
* To make AirSpec a standalone library without any cyclic project references, AirSpec embeds the source code of
136137
* airframe-log, di, surface, etc.

β€Žairspec/src/main/scala-3/wvlet/airspec/AirSpecSpiCompat.scala

+8-8
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ object AirSpecTestBuilder extends wvlet.log.LogSupport {
7373
}
7474

7575
private[airspec] object AirSpecMacros {
76-
import scala.quoted._
76+
import scala.quoted.*
7777

7878
def test0Impl[R](self: Expr[AirSpecTestBuilder], body: Expr[R])(using Type[R], Quotes): Expr[Unit] = {
7979
'{
80-
import AirSpecTestBuilder._
80+
import AirSpecTestBuilder.*
8181
${ self }.addF0(LazyF0(${ body }))
8282
}
8383
}
@@ -93,12 +93,12 @@ private[airspec] object AirSpecMacros {
9393
// Nil or Seq[_], Scala 3 complier passes Function1[Int, R] as a body even if the code block take no argument.
9494
case '{ $x: t } if TypeRepr.of[t] =:= TypeRepr.of[Nil.type] || TypeRepr.of[t] <:< TypeRepr.of[Seq[_]] =>
9595
'{
96-
import AirSpecTestBuilder._
96+
import AirSpecTestBuilder.*
9797
${ self }.addF0(LazyF0.apply(${ body }))
9898
}
9999
case _ =>
100100
'{
101-
import AirSpecTestBuilder._
101+
import AirSpecTestBuilder.*
102102
${ self }.addF1(Surface.of[D1], ${ body })
103103
}
104104
}
@@ -109,7 +109,7 @@ private[airspec] object AirSpecMacros {
109109
body: Expr[(D1, D2) => R]
110110
)(using Type[D1], Type[D2], Type[R], Quotes): Expr[Unit] = {
111111
'{
112-
import AirSpecTestBuilder._
112+
import AirSpecTestBuilder.*
113113
${ self }.addF2(Surface.of[D1], Surface.of[D2], ${ body })
114114
}
115115
}
@@ -119,7 +119,7 @@ private[airspec] object AirSpecMacros {
119119
body: Expr[(D1, D2, D3) => R]
120120
)(using Type[D1], Type[D2], Type[D3], Type[R], Quotes): Expr[Unit] = {
121121
'{
122-
import AirSpecTestBuilder._
122+
import AirSpecTestBuilder.*
123123
${ self }.addF3(Surface.of[D1], Surface.of[D2], Surface.of[D3], ${ body })
124124
}
125125
}
@@ -129,7 +129,7 @@ private[airspec] object AirSpecMacros {
129129
body: Expr[(D1, D2, D3, D4) => R]
130130
)(using Type[D1], Type[D2], Type[D3], Type[D4], Type[R], Quotes): Expr[Unit] = {
131131
'{
132-
import AirSpecTestBuilder._
132+
import AirSpecTestBuilder.*
133133
${ self }.addF4(Surface.of[D1], Surface.of[D2], Surface.of[D3], Surface.of[D4], ${ body })
134134
}
135135
}
@@ -139,7 +139,7 @@ private[airspec] object AirSpecMacros {
139139
body: Expr[(D1, D2, D3, D4, D5) => R]
140140
)(using Type[D1], Type[D2], Type[D3], Type[D4], Type[D5], Type[R], Quotes): Expr[Unit] = {
141141
'{
142-
import AirSpecTestBuilder._
142+
import AirSpecTestBuilder.*
143143
${ self }.addF5(
144144
Surface.of[D1],
145145
Surface.of[D2],

β€Žexamples/rpc-examples/hello-rpc/api/src/main/scala/greeter/api/GreeterApi.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package greeter.api
22

3-
import wvlet.airframe.http._
3+
import wvlet.airframe.http.*
44
import wvlet.log.LogSupport
55

66
@RPC

β€Žexamples/rpc-examples/hello-rpc/src/main/scala/greeter/GreeterMain.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
package greeter
1515

1616
import greeter.api.{GreeterApi, GreeterRPC}
17-
import wvlet.airframe.http._
17+
import wvlet.airframe.http.*
1818
import wvlet.airframe.http.netty.Netty
1919
import wvlet.airframe.launcher.{Launcher, command, option}
2020
import wvlet.log.{LogSupport, Logger}

β€Žexamples/rpc-examples/rpc-scalajs/api/src/main/scala/example/api/HelloApi.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ t * See the License for the specific language governing permissions and
1313
*/
1414
package example.api
1515

16-
import wvlet.airframe.http._
16+
import wvlet.airframe.http.*
1717

1818
@RPC
1919
trait HelloApi {

β€Žexamples/rpc-examples/rpc-scalajs/server/src/main/scala/example/server/ServerMain.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
package example.server
1515

16-
import wvlet.airframe.http._
16+
import wvlet.airframe.http.*
1717
import wvlet.airframe.launcher.{Launcher, command, option}
1818
import wvlet.log.{LogSupport, Logger}
1919
import wvlet.airframe.http.netty.{Netty, NettyServer}

β€Žexamples/rpc-examples/rpc-scalajs/ui/src/main/scala/example/ui/ExampleUI.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ package example.ui
1616
import example.api.ServiceRPC
1717
import org.scalajs.dom
1818
import org.scalajs.dom.MouseEvent
19-
import wvlet.airframe.http._
19+
import wvlet.airframe.http.*
2020
import wvlet.airframe.rx.{Rx, RxOption}
2121
import wvlet.airframe.rx.html.{DOMRenderer, RxElement}
2222

2323
import scala.scalajs.js.annotation.JSExport
24-
import wvlet.airframe.rx.html._
25-
import wvlet.airframe.rx.html.all._
24+
import wvlet.airframe.rx.html.*
25+
import wvlet.airframe.rx.html.all.*
2626
import wvlet.log.{LogLevel, LogSupport, Logger}
2727

2828
/**

β€Žexamples/rx-demo/gallery/src/main/scala/Gallery.scala

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package wvlet.airframe.rx.html.widget.demo
1616
import org.scalajs.dom
1717
import org.scalajs.dom.document
1818
import wvlet.airframe.rx.Rx
19-
import wvlet.airframe.rx.html.all._
19+
import wvlet.airframe.rx.html.all.*
2020
import wvlet.airframe.rx.html.{DOMRenderer, RxCode, RxComponent, RxElement, tags}
2121
import wvlet.airframe.rx.html.HtmlCompat.extractCode
2222
import wvlet.log.{LogLevel, LogSupport, Logger}
@@ -125,7 +125,7 @@ object Gallery extends LogSupport {
125125
def buttonSmallDemo: Example = Example(
126126
"Small buttons",
127127
extractCode {
128-
import wvlet.airframe.rx.html.all._
128+
import wvlet.airframe.rx.html.all.*
129129

130130
def smallButton(style: String) =
131131
button(tpe -> "button", cls -> s"btn btn-sm btn-${style}", style)
@@ -196,7 +196,7 @@ object Gallery extends LogSupport {
196196

197197
// Creating a new canvas
198198
val c = newCanvas(50, 50)
199-
import c._
199+
import c.*
200200
context.fillStyle = "#99CCFF"
201201
context.fillRect(0, 0, c.canvas.width, c.canvas.height)
202202
context.strokeStyle = "#336699"
@@ -210,8 +210,8 @@ object Gallery extends LogSupport {
210210
def svgDemo = Example(
211211
"SVG",
212212
extractCode {
213-
import wvlet.airframe.rx.html.svgAttrs._
214-
import wvlet.airframe.rx.html.svgTags._
213+
import wvlet.airframe.rx.html.svgAttrs.*
214+
import wvlet.airframe.rx.html.svgTags.*
215215

216216
val circleColor = Rx.variable("white")
217217

@@ -245,7 +245,7 @@ object Gallery extends LogSupport {
245245
def elementGallery = Example(
246246
"RxElement",
247247
extractCode {
248-
import wvlet.airframe.rx.html.all._
248+
import wvlet.airframe.rx.html.all.*
249249

250250
class MyButton(name: String) extends RxElement {
251251
def render: RxElement = button(cls -> "btn btn-outline-primary", name)
@@ -258,7 +258,7 @@ object Gallery extends LogSupport {
258258
def customElementGallery = Example(
259259
"Customize RxElement",
260260
extractCode {
261-
import wvlet.airframe.rx.html.all._
261+
import wvlet.airframe.rx.html.all.*
262262

263263
def myButton = button(cls -> "btn btn-outline-primary")
264264

@@ -270,7 +270,7 @@ object Gallery extends LogSupport {
270270
def componentGallery = Example(
271271
"RxComponent",
272272
extractCode {
273-
import wvlet.airframe.rx.html.all._
273+
import wvlet.airframe.rx.html.all.*
274274

275275
// RxComponent is the unit of a reactive widget that can enclose other components or elements.
276276
class MyComponent extends RxComponent {
@@ -285,7 +285,7 @@ object Gallery extends LogSupport {
285285
def timer = Example(
286286
"Timer",
287287
extractCode {
288-
import wvlet.airframe.rx.html.all._
288+
import wvlet.airframe.rx.html.all.*
289289
var i = 0
290290

291291
// Run the code every 1 second (1000 milliseconds)

β€Žsbt-airframe/src/main/scala/wvlet/airframe/sbt/http/AirframeHttpPlugin.scala

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ package wvlet.airframe.sbt.http
1616
import java.io.{File, FileInputStream}
1717
import java.nio.file.Files
1818
import java.util.zip.GZIPInputStream
19-
import coursier._
19+
import coursier.*
2020
import coursier.core.Extension
2121
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream
2222
import org.apache.commons.compress.utils.IOUtils
23-
import sbt._
23+
import sbt.*
2424
import wvlet.airframe.codec.MessageCodec
2525
import wvlet.airframe.control.OS
2626
import wvlet.log.LogSupport
2727
import wvlet.log.io.IOUtil.withResource
2828

29-
import scala.sys.process._
29+
import scala.sys.process.*
3030

3131
/**
3232
* sbt plugin for supporting Airframe HTTP development.
@@ -43,7 +43,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport {
4343

4444
object autoImport extends Keys
4545

46-
import autoImport._
46+
import autoImport.*
4747

4848
override def requires: Plugins = sbt.plugins.JvmPlugin
4949
override def trigger = noTrigger
@@ -90,7 +90,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport {
9090
private val cacheFileName = "generated.cache"
9191

9292
def httpProjectSettings = {
93-
import sbt.Keys._
93+
import sbt.Keys.*
9494
Seq(
9595
airframeHttpClients := Seq.empty,
9696
airframeHttpClasspass := {
@@ -127,7 +127,7 @@ object AirframeHttpPlugin extends AutoPlugin with LogSupport {
127127

128128
if (needsUpdate) {
129129
// Download airframe-http.tgz with coursier
130-
import coursier._
130+
import coursier.*
131131
val moduleName = s"airframe-http-codegen_${scalaBinaryVersion.value}"
132132
val d =
133133
Dependency(

β€Žsbt-airframe/src/sbt-test/sbt-airframe/generate-client/server/src/main/scala/myapp/server/MyServer.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package myapp.server
22

3-
import wvlet.airframe.http._
3+
import wvlet.airframe.http.*
44
import wvlet.airframe.http.client.SyncClient
55
import wvlet.airframe.http.netty.Netty
66
import wvlet.log.LogSupport
77
import myapp.spi.MyService
8-
import myapp.spi.MyRPC._
8+
import myapp.spi.MyRPC.*
99

1010
class MyServiceImpl extends myapp.spi.MyService {
1111
override def hello(id: Int): String = s"hello ${id}"

0 commit comments

Comments
Β (0)