From 1ff365a1f9b798a45969037046b33bdec559a821 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Sun, 14 Jan 2024 17:53:19 +0000 Subject: [PATCH] Reformat with scalafmt 3.7.17 Executed command: scalafmt --non-interactive --- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/UsesProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/ProblematicDependency.scala | 8 ++++---- .../src/test/UsesProblematicDependency.scala | 8 ++++---- .../hoangmaihuy/missinglink/MissinglinkCheckModule.scala | 2 +- .../src/io/github/hoangmaihuy/missinglink/package.scala | 1 - 13 files changed, 45 insertions(+), 46 deletions(-) diff --git a/itest/src/do-not-fail-on-conflicts/src/test/ProblematicDependency.scala b/itest/src/do-not-fail-on-conflicts/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/do-not-fail-on-conflicts/src/test/ProblematicDependency.scala +++ b/itest/src/do-not-fail-on-conflicts/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/exclude-problematic-dependency/src/test/UsesProblematicDependency.scala b/itest/src/exclude-problematic-dependency/src/test/UsesProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/exclude-problematic-dependency/src/test/UsesProblematicDependency.scala +++ b/itest/src/exclude-problematic-dependency/src/test/UsesProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/has-problematic-dependency/src/test/ProblematicDependency.scala b/itest/src/has-problematic-dependency/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/has-problematic-dependency/src/test/ProblematicDependency.scala +++ b/itest/src/has-problematic-dependency/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/ignore-destination-package/src/test/ProblematicDependency.scala b/itest/src/ignore-destination-package/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/ignore-destination-package/src/test/ProblematicDependency.scala +++ b/itest/src/ignore-destination-package/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/ignore-source-package/src/test/ProblematicDependency.scala b/itest/src/ignore-source-package/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/ignore-source-package/src/test/ProblematicDependency.scala +++ b/itest/src/ignore-source-package/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/ignores-unused-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala b/itest/src/ignores-unused-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/ignores-unused-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala +++ b/itest/src/ignores-unused-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/scans-dependencies/has-problematic-dependency/src/test/ProblematicDependency.scala b/itest/src/scans-dependencies/has-problematic-dependency/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/scans-dependencies/has-problematic-dependency/src/test/ProblematicDependency.scala +++ b/itest/src/scans-dependencies/has-problematic-dependency/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/target-destination-package/src/test/ProblematicDependency.scala b/itest/src/target-destination-package/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/target-destination-package/src/test/ProblematicDependency.scala +++ b/itest/src/target-destination-package/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/target-source-package/src/test/ProblematicDependency.scala b/itest/src/target-source-package/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/target-source-package/src/test/ProblematicDependency.scala +++ b/itest/src/target-source-package/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/uses-problematic-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala b/itest/src/uses-problematic-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala index 164c0fa..ca5be53 100644 --- a/itest/src/uses-problematic-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala +++ b/itest/src/uses-problematic-dependency/has-problematic-dependency/src/test/ProblematicDependency.scala @@ -2,13 +2,13 @@ package test import com.google.common.base.Enums -/** - * Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this - * method while overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. - */ +/** Calls a method in the Guava Enums class which was removed in guava 18. If a project calls this method while + * overriding Guava to >= 18, it will cause a NoSuchMethodError at runtime. + */ object ProblematicDependency { def reliesOnRemovedMethod(): AnyRef = { Enums.valueOfFunction(classOf[Foo]) } + } diff --git a/itest/src/uses-problematic-dependency/src/test/UsesProblematicDependency.scala b/itest/src/uses-problematic-dependency/src/test/UsesProblematicDependency.scala index 2b4b607..dc2f7fc 100644 --- a/itest/src/uses-problematic-dependency/src/test/UsesProblematicDependency.scala +++ b/itest/src/uses-problematic-dependency/src/test/UsesProblematicDependency.scala @@ -1,11 +1,11 @@ package test -/** - * Invokes a method from [[test.ProblematicDependency]] which will blow up if - * Guava >= 18 is used. - */ +/** Invokes a method from [[test.ProblematicDependency]] which will blow up if Guava >= 18 is used. + */ object UsesProblematicDependency { + def callsClassThatReliesOnDeletedGuavaMethod(): AnyRef = { ProblematicDependency.reliesOnRemovedMethod() } + } diff --git a/mill-missinglink/src/io/github/hoangmaihuy/missinglink/MissinglinkCheckModule.scala b/mill-missinglink/src/io/github/hoangmaihuy/missinglink/MissinglinkCheckModule.scala index cf2c77a..04a055f 100644 --- a/mill-missinglink/src/io/github/hoangmaihuy/missinglink/MissinglinkCheckModule.scala +++ b/mill-missinglink/src/io/github/hoangmaihuy/missinglink/MissinglinkCheckModule.scala @@ -31,7 +31,7 @@ trait MissinglinkCheckModule extends JavaModule { /** Optional list of packages to ignore conflicts where the destination/called-side of the conflict is in one of the * specified packages. */ - def missinglinkIgnoreDestinationPackages: T[Seq[IgnoredPackage]] = T { Seq.empty[IgnoredPackage] } + def missinglinkIgnoreDestinationPackages: T[Seq[IgnoredPackage]] = T { Seq.empty[IgnoredPackage] } /** Optional list of source packages to specifically target conflicts in. Cannot be used with * missinglinkIgnoreDestinationPackages. diff --git a/mill-missinglink/src/io/github/hoangmaihuy/missinglink/package.scala b/mill-missinglink/src/io/github/hoangmaihuy/missinglink/package.scala index e4f6b19..42763c1 100644 --- a/mill-missinglink/src/io/github/hoangmaihuy/missinglink/package.scala +++ b/mill-missinglink/src/io/github/hoangmaihuy/missinglink/package.scala @@ -15,7 +15,6 @@ package object missinglink { private[missinglink] implicit object IgnoredPackages extends PackageFilters[IgnoredPackage] { - def apply(name: String)(filters: Seq[IgnoredPackage]): Boolean = filters.forall(_.apply(name)) }