~jan0sch/smederee
Showing details for patch 63d1b984d4693c8ee1e908cbecfa469218f4b9f6.
diff -rN -u old-smederee/CODINGSTYLE.md new-smederee/CODINGSTYLE.md --- old-smederee/CODINGSTYLE.md 2025-01-14 10:33:56.832018400 +0000 +++ new-smederee/CODINGSTYLE.md 2025-01-14 10:33:56.844018416 +0000 @@ -8,9 +8,9 @@ ## 2. General style and tooling -1. The [Scalafmt](https://scalameta.org/scalafmt/) tool MUST be used to format the code. -2. The configuration file for Scalafmt SHALL be the file [.scalafmt.conf](.scalafmt.conf) in the project root. -3. The configuration SHALL be based upon the preset `defaultWithAlign` using the runner dialect `scala3` of Scalafmt with some additions. +1. The tools [Scalafmt](https://scalameta.org/scalafmt/) and [Scalafix](https://scalacenter.github.io/scalafix/) MUST be used to format the code. +2. The configuration file for Scalafmt SHALL be the file [.scalafmt.conf](.scalafmt.conf) in the project root and SHALL be based upon the preset `defaultWithAlign` using the runner dialect `scala3` of Scalafmt with some additions. +3. The configuration file for Scalafix SHALL be the file [.scalafix.conf](.scalafix.conf) in the project root and SHALL be configured to organize (rewrite) import rules. 4. In the rare case of formatting interfering with code functionality, it is RECOMMENDED to disable automatic code formatting for the affected parts of the code only. ### 2.1. Additions to the `defaultWithAlign` preset @@ -18,10 +18,13 @@ 1. No unicode characters or literals are allowed in the source code e.g. `⇒` SHALL be written as `=>` or `←` as `<-` and so on. 2. Rewrite rules SHOULD exist in the configuration to rewrite common unicode characters to their ASCII counterparts. 3. The maximum line length in the source code SHOULD not be longer than 120 characters. There MAY be rare cases where exceptions are allowed. -4. Imports SHOULD be written after the following guidelines: +4. Imports SHOULD be written after the following guidelines and automatically applied by running Scalafix: 1. Imports from Java core (e.g. `import java.time._`) MUST be written (grouped) first, followed by a blank line. - 2. Multiple imports from the same package in curly braces SHALL have a space after the opening and before the closing brace (enforced by `spaces.inImportCurlyBraces=true`). - 3. Imports SHALL be sorted by their ASCII names. This SHOULD be enforced by the `rewrite.imports.sort = ascii` setting of Scalafmt. + 2. Imports from the Scala core (e.g. `import scala.util.Failure`) MUST be written (grouped) last, prefixed by a blank line. + 3. Other imports SHOULD be grouped in between the Java and Scala core imports. + 4. Within the other imports test framework imports (e.g. `munit.` or `org.scalacheck.`) SHOULD be put last and grouped. + 5. Multiple imports from the same package in curly braces SHALL be rewritten as single import per line. This intends to reduce possible merge conflicts by import changes. The option `groupedImports = Explode` for Scalafix is intended to rewrite affected code automatically. + 6. Imports SHALL be sorted by their ASCII names. This SHOULD be enforced by the `importsOrder` setting of Scalafix. 5. Redundant braces SHALL be removed (enforced by `rewrite.rules` including `RedundantBraces`). 6. Redundant parentheses SHALL be removed (enforced by `rewrite.rules` including `RedundantParens`). 7. Configuration files for sbt (e.g. `*.sbt`) MUST NOT be formatted via Scalafmt. diff -rN -u old-smederee/modules/email/src/main/scala/de/smederee/email/SimpleJavaMailMiddleware.scala new-smederee/modules/email/src/main/scala/de/smederee/email/SimpleJavaMailMiddleware.scala --- old-smederee/modules/email/src/main/scala/de/smederee/email/SimpleJavaMailMiddleware.scala 2025-01-14 10:33:56.832018400 +0000 +++ new-smederee/modules/email/src/main/scala/de/smederee/email/SimpleJavaMailMiddleware.scala 2025-01-14 10:33:56.844018416 +0000 @@ -21,11 +21,11 @@ import cats.effect._ import cats.syntax.all._ +import org.simplejavamail.api.email.Email import org.simplejavamail.api.mailer.Mailer import org.simplejavamail.api.mailer.config.TransportStrategy import org.simplejavamail.email.EmailBuilder import org.simplejavamail.mailer.MailerBuilder -import org.simplejavamail.api.email.Email /** Provides an [[EmailMiddleware]] using the [Simple Java Mail](https://www.simplejavamail.org/) library and the IO * monad from cats effect. diff -rN -u old-smederee/modules/email/src/test/scala/de/smederee/email/EmailMiddlewareTest.scala new-smederee/modules/email/src/test/scala/de/smederee/email/EmailMiddlewareTest.scala --- old-smederee/modules/email/src/test/scala/de/smederee/email/EmailMiddlewareTest.scala 2025-01-14 10:33:56.832018400 +0000 +++ new-smederee/modules/email/src/test/scala/de/smederee/email/EmailMiddlewareTest.scala 2025-01-14 10:33:56.844018416 +0000 @@ -22,8 +22,9 @@ import de.smederee.email.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class EmailMiddlewareTest extends ScalaCheckSuite { given Arbitrary[FromAddress] = Arbitrary(genValidFromAddress) diff -rN -u old-smederee/modules/email/src/test/scala/de/smederee/email/SimpleJavaMailMiddlewareHelpersTest.scala new-smederee/modules/email/src/test/scala/de/smederee/email/SimpleJavaMailMiddlewareHelpersTest.scala --- old-smederee/modules/email/src/test/scala/de/smederee/email/SimpleJavaMailMiddlewareHelpersTest.scala 2025-01-14 10:33:56.832018400 +0000 +++ new-smederee/modules/email/src/test/scala/de/smederee/email/SimpleJavaMailMiddlewareHelpersTest.scala 2025-01-14 10:33:56.844018416 +0000 @@ -23,8 +23,9 @@ import jakarta.mail.Message.RecipientType import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ import scala.jdk.CollectionConverters._ diff -rN -u old-smederee/modules/html-utils/src/main/scala/de/smederee/html/ExternalUrlConfiguration.scala new-smederee/modules/html-utils/src/main/scala/de/smederee/html/ExternalUrlConfiguration.scala --- old-smederee/modules/html-utils/src/main/scala/de/smederee/html/ExternalUrlConfiguration.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/html-utils/src/main/scala/de/smederee/html/ExternalUrlConfiguration.scala 2025-01-14 10:33:56.844018416 +0000 @@ -17,7 +17,8 @@ package de.smederee.html -import com.comcast.ip4s.{ Host, Port } +import com.comcast.ip4s.Host +import com.comcast.ip4s.Port import org.http4s.Uri /** A wrapper for bundling values to configure a possible "external url mapping", the idea is that a service might be diff -rN -u old-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala new-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala --- old-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/html-utils/src/main/scala/de/smederee/html/MarkdownRenderer.scala 2025-01-14 10:33:56.844018416 +0000 @@ -28,7 +28,8 @@ import org.commonmark.renderer.NodeRenderer import org.commonmark.renderer.html._ import org.http4s.Uri -import org.slf4j.{ Logger, LoggerFactory } +import org.slf4j.Logger +import org.slf4j.LoggerFactory import scala.annotation.nowarn import scala.jdk.CollectionConverters._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRepository.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRepository.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRepository.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRepository.scala 2025-01-14 10:33:56.848018421 +0000 @@ -19,10 +19,10 @@ import java.util.UUID +import de.smederee.i18n.LanguageCode import de.smederee.security._ import de.smederee.ssh.PublicSshKey import fs2.Stream -import de.smederee.i18n.LanguageCode /** The base class for database operations related to account management for users. * diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/AccountManagementRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -18,8 +18,11 @@ package de.smederee.hub import java.io.IOException -import java.nio.file.{ FileVisitResult, FileVisitor, Files } -import java.time.{ OffsetDateTime, ZoneOffset } +import java.nio.file.FileVisitResult +import java.nio.file.FileVisitor +import java.nio.file.Files +import java.time.OffsetDateTime +import java.time.ZoneOffset import java.util.UUID import cats._ @@ -34,7 +37,8 @@ import de.smederee.i18n.LanguageCode import de.smederee.security._ import de.smederee.ssh._ -import de.smederee.tickets.{ TicketServiceApi, TicketsUser } +import de.smederee.tickets.TicketServiceApi +import de.smederee.tickets.TicketsUser import org.http4s._ import org.http4s.dsl._ import org.http4s.headers.Location diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/AuthenticationRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/AuthenticationRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/AuthenticationRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/AuthenticationRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,7 +17,8 @@ package de.smederee.hub -import java.time.{ OffsetDateTime, ZoneOffset } +import java.time.OffsetDateTime +import java.time.ZoneOffset import cats.data._ import cats.effect._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/config/SmedereeHubConfig.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/config/SmedereeHubConfig.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/config/SmedereeHubConfig.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/config/SmedereeHubConfig.scala 2025-01-14 10:33:56.848018421 +0000 @@ -21,7 +21,8 @@ import java.nio.file._ import cats.kernel.Eq -import com.comcast.ip4s.{ Host, Port } +import com.comcast.ip4s.Host +import com.comcast.ip4s.Port import de.smederee.email._ import de.smederee.html.ExternalUrlConfiguration import de.smederee.security._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/DoobieVcsMetadataRepository.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/DoobieVcsMetadataRepository.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/DoobieVcsMetadataRepository.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/DoobieVcsMetadataRepository.scala 2025-01-14 10:33:56.848018421 +0000 @@ -23,7 +23,8 @@ import cats.syntax.all._ import de.smederee.email.EmailAddress import de.smederee.hub.VcsMetadataRepositoriesOrdering._ -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import doobie.Fragments._ import doobie._ import doobie.implicits._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/HubServer.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/HubServer.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/HubServer.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/HubServer.scala 2025-01-14 10:33:56.848018421 +0000 @@ -28,7 +28,8 @@ import cats.syntax.all._ import com.typesafe.config._ import de.smederee.darcs._ -import de.smederee.email.{ EmailAddress, SimpleJavaMailMiddleware } +import de.smederee.email.EmailAddress +import de.smederee.email.SimpleJavaMailMiddleware import de.smederee.html._ import de.smederee.hub.config._ import de.smederee.security._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/RelatedTypesConverter.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/RelatedTypesConverter.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/RelatedTypesConverter.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/RelatedTypesConverter.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,7 +17,12 @@ package de.smederee.hub -import de.smederee.tickets.{ Project, ProjectDescription, ProjectName, ProjectOwner, ProjectOwnerId, ProjectOwnerName } +import de.smederee.tickets.Project +import de.smederee.tickets.ProjectDescription +import de.smederee.tickets.ProjectName +import de.smederee.tickets.ProjectOwner +import de.smederee.tickets.ProjectOwnerId +import de.smederee.tickets.ProjectOwnerName /** A type class for converting types into each other. * diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/RequestHelpers.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/RequestHelpers.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/RequestHelpers.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/RequestHelpers.scala 2025-01-14 10:33:56.848018421 +0000 @@ -19,7 +19,8 @@ import cats.syntax.all._ import de.smederee.hub.config.Constants -import de.smederee.security.{ CsrfToken, SignedToken } +import de.smederee.security.CsrfToken +import de.smederee.security.SignedToken import org.http4s._ trait RequestHelpers[A] { diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/ResetPasswordRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,18 +17,20 @@ package de.smederee.hub -import java.time.{ OffsetDateTime, ZoneOffset } +import java.time.OffsetDateTime +import java.time.ZoneOffset import cats.data._ import cats.effect._ import cats.syntax.all._ import de.smederee.email._ -import de.smederee.html._ import de.smederee.html.LinkTools._ +import de.smederee.html._ import de.smederee.hub.RequestHelpers.instances.given_RequestHelpers_Request import de.smederee.hub._ import de.smederee.hub.config._ -import de.smederee.hub.forms.types.{ FormErrors, FormFieldError } +import de.smederee.hub.forms.types.FormErrors +import de.smederee.hub.forms.types.FormFieldError import de.smederee.i18n.LanguageCode import org.http4s._ import org.http4s.dsl.Http4sDsl diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/SessionHelpers.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/SessionHelpers.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/SessionHelpers.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/SessionHelpers.scala 2025-01-14 10:33:56.848018421 +0000 @@ -20,9 +20,12 @@ import java.time._ import cats.syntax.all._ -import de.smederee.hub.config.{ AuthenticationTimeouts, Constants } +import de.smederee.hub.config.AuthenticationTimeouts +import de.smederee.hub.config.Constants import de.smederee.security.SignedToken -import org.http4s.{ HttpDate, ResponseCookie, SameSite } +import org.http4s.HttpDate +import org.http4s.ResponseCookie +import org.http4s.SameSite import scala.concurrent.duration.FiniteDuration diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/types.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/types.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/types.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/types.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,8 +17,8 @@ package de.smederee.hub -import java.util.Base64 import java.security.SecureRandom +import java.util.Base64 import cats.Eq import cats.syntax.all._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -33,7 +33,8 @@ import de.smederee.hub.config._ import de.smederee.hub.forms.types.FormErrors import de.smederee.i18n.LanguageCode -import de.smederee.security.{ CsrfToken, Username } +import de.smederee.security.CsrfToken +import de.smederee.security.Username import de.smederee.tickets.ProjectRepository import org.fusesource.jansi.utils.UtilsAnsiHtml import org.http4s._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepository.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepository.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepository.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepository.scala 2025-01-14 10:33:56.848018421 +0000 @@ -24,7 +24,8 @@ import cats.data._ import cats.syntax.all._ import de.smederee.email.EmailAddress -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import org.http4s.Uri import org.slf4j.LoggerFactory diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSftpFileSystemAccessor.scala new-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSftpFileSystemAccessor.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSftpFileSystemAccessor.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSftpFileSystemAccessor.scala 2025-01-14 10:33:56.848018421 +0000 @@ -24,9 +24,10 @@ import cats.effect.std.Dispatcher import cats.effect.unsafe.implicits.global import cats.syntax.all._ -import de.smederee.hub.config._ import de.smederee.hub.VcsRepositoryName -import de.smederee.security.{ UserId, Username } +import de.smederee.hub.config._ +import de.smederee.security.UserId +import de.smederee.security.Username import org.apache.sshd.sftp.server._ import org.slf4j.LoggerFactory diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSshCommand.scala new-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSshCommand.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSshCommand.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/ssh/DarcsSshCommand.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,7 +17,8 @@ package de.smederee.ssh -import java.io.{ InputStream, OutputStream } +import java.io.InputStream +import java.io.OutputStream import java.nio.file.Paths import cats._ @@ -25,16 +26,20 @@ import cats.effect.std.Dispatcher import cats.effect.unsafe.implicits.global import cats.syntax.all._ -import de.smederee.hub.config._ import de.smederee.hub.VcsRepositoryName -import de.smederee.security.{ UserId, Username } +import de.smederee.hub.config._ +import de.smederee.security.UserId +import de.smederee.security.Username import org.apache.sshd.scp.common.ScpHelper import org.apache.sshd.scp.server._ +import org.apache.sshd.server.Environment +import org.apache.sshd.server.ExitCallback import org.apache.sshd.server.channel.ChannelSession -import org.apache.sshd.server.command.{ Command, CommandFactory } -import org.apache.sshd.server.session.{ ServerSession, ServerSessionAware } +import org.apache.sshd.server.command.Command +import org.apache.sshd.server.command.CommandFactory +import org.apache.sshd.server.session.ServerSession +import org.apache.sshd.server.session.ServerSessionAware import org.apache.sshd.server.shell.UnknownCommand -import org.apache.sshd.server.{ Environment, ExitCallback } import org.slf4j.LoggerFactory import scala.util.matching.Regex diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/ssh/DoobieSshAuthenticationRepository.scala new-smederee/modules/hub/src/main/scala/de/smederee/ssh/DoobieSshAuthenticationRepository.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/ssh/DoobieSshAuthenticationRepository.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/ssh/DoobieSshAuthenticationRepository.scala 2025-01-14 10:33:56.848018421 +0000 @@ -22,7 +22,8 @@ import cats.effect._ import de.smederee.email.EmailAddress import de.smederee.hub._ -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import doobie._ import doobie.implicits._ import doobie.postgres.implicits._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/ssh/NoLogin.scala new-smederee/modules/hub/src/main/scala/de/smederee/ssh/NoLogin.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/ssh/NoLogin.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/ssh/NoLogin.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,13 +17,15 @@ package de.smederee.ssh -import java.io.{ InputStream, OutputStream } +import java.io.InputStream +import java.io.OutputStream import java.nio.charset.StandardCharsets import cats.syntax.all._ import com.comcast.ip4s._ +import org.apache.sshd.server.Environment +import org.apache.sshd.server.ExitCallback import org.apache.sshd.server.channel.ChannelSession -import org.apache.sshd.server.{ Environment, ExitCallback } import org.apache.sshd.server.command.Command import org.apache.sshd.server.shell.ShellFactory diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/ssh/PublicSshKey.scala new-smederee/modules/hub/src/main/scala/de/smederee/ssh/PublicSshKey.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/ssh/PublicSshKey.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/ssh/PublicSshKey.scala 2025-01-14 10:33:56.848018421 +0000 @@ -19,7 +19,8 @@ import java.security.MessageDigest import java.time.OffsetDateTime -import java.util.{ Base64, UUID } +import java.util.Base64 +import java.util.UUID import cats._ import cats.syntax.all._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/ssh/SshServer.scala new-smederee/modules/hub/src/main/scala/de/smederee/ssh/SshServer.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/ssh/SshServer.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/ssh/SshServer.scala 2025-01-14 10:33:56.848018421 +0000 @@ -24,7 +24,8 @@ import cats.effect._ import com.comcast.ip4s._ import de.smederee.hub.config._ -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import doobie._ import org.apache.sshd.common.AttributeRepository.AttributeKey import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/tickets/LabelRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -23,10 +23,11 @@ import cats.syntax.all._ import de.smederee.html.LinkTools._ import de.smederee.html._ -import de.smederee.hub.RequestHelpers.instances.given import de.smederee.hub.Account +import de.smederee.hub.RequestHelpers.instances.given import de.smederee.i18n.LanguageCode -import de.smederee.security.{ CsrfToken, Username } +import de.smederee.security.CsrfToken +import de.smederee.security.Username import de.smederee.tickets.config._ import de.smederee.tickets.forms.types._ import org.http4s._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/tickets/MilestoneRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/tickets/MilestoneRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/tickets/MilestoneRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/tickets/MilestoneRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -26,7 +26,8 @@ import de.smederee.hub.Account import de.smederee.hub.RequestHelpers.instances.given import de.smederee.i18n.LanguageCode -import de.smederee.security.{ CsrfToken, Username } +import de.smederee.security.CsrfToken +import de.smederee.security.Username import de.smederee.tickets.config._ import de.smederee.tickets.forms.types._ import org.http4s._ diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/tickets/TicketRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/tickets/TicketRoutes.scala --- old-smederee/modules/hub/src/main/scala/de/smederee/tickets/TicketRoutes.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/main/scala/de/smederee/tickets/TicketRoutes.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,7 +17,8 @@ package de.smederee.tickets -import java.time.{ OffsetDateTime, ZoneOffset } +import java.time.OffsetDateTime +import java.time.ZoneOffset import cats._ import cats.data._ @@ -28,7 +29,8 @@ import de.smederee.hub.Account import de.smederee.hub.RequestHelpers.instances.given import de.smederee.i18n.LanguageCode -import de.smederee.security.{ CsrfToken, Username } +import de.smederee.security.CsrfToken +import de.smederee.security.Username import de.smederee.tickets.config._ import de.smederee.tickets.forms.types._ import org.http4s._ diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/AuthenticationRoutesTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/AuthenticationRoutesTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/AuthenticationRoutesTest.scala 2025-01-14 10:33:56.836018406 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/AuthenticationRoutesTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -26,7 +26,8 @@ import de.smederee.hub.config._ import de.smederee.hub.forms._ import de.smederee.hub.forms.types._ -import de.smederee.security.{ SignAndValidate, SignedToken } +import de.smederee.security.SignAndValidate +import de.smederee.security.SignedToken import org.http4s._ import org.http4s.implicits._ import org.http4s.server._ diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieAccountManagementRepositoryTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieAccountManagementRepositoryTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieAccountManagementRepositoryTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieAccountManagementRepositoryTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,7 +17,8 @@ package de.smederee.hub -import java.time.{ OffsetDateTime, ZoneOffset } +import java.time.OffsetDateTime +import java.time.ZoneOffset import java.util.UUID import cats.effect._ diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieResetPasswordRepositoryTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieResetPasswordRepositoryTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieResetPasswordRepositoryTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/DoobieResetPasswordRepositoryTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -18,7 +18,8 @@ package de.smederee.hub import java.nio.charset.StandardCharsets -import java.time.{ OffsetDateTime, ZoneOffset } +import java.time.OffsetDateTime +import java.time.ZoneOffset import cats.effect._ import cats.syntax.all._ diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/Generators.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/Generators.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/Generators.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/Generators.scala 2025-01-14 10:33:56.848018421 +0000 @@ -19,7 +19,8 @@ import java.nio.charset.StandardCharsets import java.time._ -import java.util.{ Locale, UUID } +import java.util.Locale +import java.util.UUID import cats.syntax.all._ import de.smederee.email.EmailAddress diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionHelpersTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionHelpersTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionHelpersTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionHelpersTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -17,17 +17,22 @@ package de.smederee.hub -import java.time.{ OffsetDateTime, ZoneOffset, ZonedDateTime } +import java.time.OffsetDateTime +import java.time.ZoneOffset +import java.time.ZonedDateTime import de.smederee.hub.Generators.given import de.smederee.hub.SessionHelpers.instances._ -import de.smederee.hub.config.{ AuthenticationTimeouts, Constants } +import de.smederee.hub.config.AuthenticationTimeouts +import de.smederee.hub.config.Constants import de.smederee.security.SignAndValidate -import org.http4s.{ HttpDate, SameSite } +import org.http4s.HttpDate +import org.http4s.SameSite import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ import scala.concurrent.duration._ diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionIdTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionIdTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionIdTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionIdTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -23,8 +23,9 @@ import de.smederee.security._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class SessionIdTest extends ScalaCheckSuite { private val genKey: Gen[PrivateKey] = diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/SessionTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -21,8 +21,9 @@ import de.smederee.hub.Generators.given import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class SessionTest extends ScalaCheckSuite { diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/hub/VcsRepositoryPatchMetadataTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/hub/VcsRepositoryPatchMetadataTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/hub/VcsRepositoryPatchMetadataTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/hub/VcsRepositoryPatchMetadataTest.scala 2025-01-14 10:33:56.848018421 +0000 @@ -18,8 +18,9 @@ package de.smederee.hub import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class VcsRepositoryPatchMetadataTest extends ScalaCheckSuite { private val genVcsPatchFilename: Gen[VcsPatchFilename] = diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/ssh/PublicSshKeyTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/ssh/PublicSshKeyTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/ssh/PublicSshKeyTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/ssh/PublicSshKeyTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -17,7 +17,8 @@ package de.smederee.ssh -import java.time.{ OffsetDateTime, ZoneOffset } +import java.time.OffsetDateTime +import java.time.ZoneOffset import java.util.UUID import de.smederee.security._ diff -rN -u old-smederee/modules/hub/src/test/scala/de/smederee/ssh/SshUsernameTest.scala new-smederee/modules/hub/src/test/scala/de/smederee/ssh/SshUsernameTest.scala --- old-smederee/modules/hub/src/test/scala/de/smederee/ssh/SshUsernameTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/hub/src/test/scala/de/smederee/ssh/SshUsernameTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -22,8 +22,9 @@ import cats.syntax.all._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class SshUsernameTest extends ScalaCheckSuite { val genValidSshUsername: Gen[SshUsername] = diff -rN -u old-smederee/modules/i18n/src/main/scala/de/smederee/i18n/Messages.scala new-smederee/modules/i18n/src/main/scala/de/smederee/i18n/Messages.scala --- old-smederee/modules/i18n/src/main/scala/de/smederee/i18n/Messages.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/i18n/src/main/scala/de/smederee/i18n/Messages.scala 2025-01-14 10:33:56.852018426 +0000 @@ -17,13 +17,15 @@ package de.smederee.i18n +import java.text.MessageFormat import java.util.Locale import java.util.ResourceBundle -import java.text.MessageFormat import org.slf4j.LoggerFactory -import scala.util.{ Failure, Success, Try } +import scala.util.Failure +import scala.util.Success +import scala.util.Try object Messages { private val log = LoggerFactory.getLogger(getClass) diff -rN -u old-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala new-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala --- old-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/i18n/src/test/scala/de/smederee/i18n/LanguageCodeTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import java.util.Locale import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class LanguageCodeTest extends ScalaCheckSuite { val genLocale: Gen[Locale] = Gen.oneOf(Locale.getAvailableLocales.toList.filter(_.getISO3Language.nonEmpty)) diff -rN -u old-smederee/modules/i18n/src/test/scala/de/smederee/i18n/MessagesTest.scala new-smederee/modules/i18n/src/test/scala/de/smederee/i18n/MessagesTest.scala --- old-smederee/modules/i18n/src/test/scala/de/smederee/i18n/MessagesTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/i18n/src/test/scala/de/smederee/i18n/MessagesTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -17,11 +17,13 @@ package de.smederee.i18n -import java.util.{ Locale, MissingResourceException } +import java.util.Locale +import java.util.MissingResourceException import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class MessagesTest extends ScalaCheckSuite { val genLocale: Gen[Locale] = Gen.oneOf(Locale.getAvailableLocales.toList) diff -rN -u old-smederee/modules/security/src/main/scala/de/smederee/security/SignAndValidate.scala new-smederee/modules/security/src/main/scala/de/smederee/security/SignAndValidate.scala --- old-smederee/modules/security/src/main/scala/de/smederee/security/SignAndValidate.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/security/src/main/scala/de/smederee/security/SignAndValidate.scala 2025-01-14 10:33:56.852018426 +0000 @@ -18,9 +18,9 @@ package de.smederee.security import java.nio.charset.StandardCharsets +import java.security.MessageDigest import javax.crypto.Mac import javax.crypto.spec.SecretKeySpec -import java.security.MessageDigest import cats.syntax.all._ import org.springframework.security.crypto.codec.Hex diff -rN -u old-smederee/modules/security/src/test/scala/de/smederee/security/PasswordTest.scala new-smederee/modules/security/src/test/scala/de/smederee/security/PasswordTest.scala --- old-smederee/modules/security/src/test/scala/de/smederee/security/PasswordTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/security/src/test/scala/de/smederee/security/PasswordTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import java.nio.charset.StandardCharsets import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class PasswordTest extends ScalaCheckSuite { property("Password.from(null) must always be None") { diff -rN -u old-smederee/modules/security/src/test/scala/de/smederee/security/SignAndValidateTest.scala new-smederee/modules/security/src/test/scala/de/smederee/security/SignAndValidateTest.scala --- old-smederee/modules/security/src/test/scala/de/smederee/security/SignAndValidateTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/security/src/test/scala/de/smederee/security/SignAndValidateTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -22,8 +22,9 @@ import cats.syntax.all._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class SignAndValidateTest extends ScalaCheckSuite { private val genKey: Gen[PrivateKey] = diff -rN -u old-smederee/modules/security/src/test/scala/de/smederee/security/UserIdTest.scala new-smederee/modules/security/src/test/scala/de/smederee/security/UserIdTest.scala --- old-smederee/modules/security/src/test/scala/de/smederee/security/UserIdTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/security/src/test/scala/de/smederee/security/UserIdTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -22,8 +22,9 @@ import cats.syntax.all._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class UserIdTest extends ScalaCheckSuite { private val genUUID: Gen[UUID] = Gen.delay(UUID.randomUUID) diff -rN -u old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/DoobieTicketServiceApi.scala new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/DoobieTicketServiceApi.scala --- old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/DoobieTicketServiceApi.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/DoobieTicketServiceApi.scala 2025-01-14 10:33:56.852018426 +0000 @@ -22,7 +22,8 @@ import cats.effect._ import de.smederee.email.EmailAddress import de.smederee.i18n.LanguageCode -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import doobie._ import doobie.implicits._ import doobie.postgres.implicits._ diff -rN -u old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Project.scala new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Project.scala --- old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Project.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Project.scala 2025-01-14 10:33:56.852018426 +0000 @@ -23,7 +23,8 @@ import cats.data._ import cats.syntax.all._ import de.smederee.email.EmailAddress -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import scala.util.Try import scala.util.matching.Regex diff -rN -u old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Ticket.scala new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Ticket.scala --- old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Ticket.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/Ticket.scala 2025-01-14 10:33:56.852018426 +0000 @@ -21,7 +21,8 @@ import cats._ import cats.syntax.all._ -import org.http4s.{ QueryParamDecoder, QueryParamEncoder } +import org.http4s.QueryParamDecoder +import org.http4s.QueryParamEncoder import org.http4s.dsl.impl.OptionalQueryParamDecoderMatcher import scala.util.matching.Regex diff -rN -u old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/TicketsUser.scala new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/TicketsUser.scala --- old-smederee/modules/tickets/src/main/scala/de/smederee/tickets/TicketsUser.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/main/scala/de/smederee/tickets/TicketsUser.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,7 +20,8 @@ import cats._ import de.smederee.email.EmailAddress import de.smederee.i18n.LanguageCode -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username /** A user of the tickets service. * diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/BaseSpec.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/BaseSpec.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/BaseSpec.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/BaseSpec.scala 2025-01-14 10:33:56.852018426 +0000 @@ -25,7 +25,8 @@ import com.typesafe.config.ConfigFactory import de.smederee.email.EmailAddress import de.smederee.i18n.LanguageCode -import de.smederee.security.{ UserId, Username } +import de.smederee.security.UserId +import de.smederee.security.Username import de.smederee.tickets.config._ import org.flywaydb.core.Flyway import pureconfig._ diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/ColourCodeTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/ColourCodeTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/ColourCodeTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/ColourCodeTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class ColourCodeTest extends ScalaCheckSuite { given Arbitrary[ColourCode] = Arbitrary(genColourCode) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/config/DatabaseMigratorTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/config/DatabaseMigratorTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/config/DatabaseMigratorTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/config/DatabaseMigratorTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,9 +20,8 @@ import cats.effect._ import cats.syntax.all._ import de.smederee.TestTags._ -import org.flywaydb.core.Flyway - import de.smederee.tickets.BaseSpec +import org.flywaydb.core.Flyway final class DatabaseMigratorTest extends BaseSpec { override def beforeEach(context: BeforeEach): Unit = { diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/Generators.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/Generators.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/Generators.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/Generators.scala 2025-01-14 10:33:56.852018426 +0000 @@ -18,7 +18,8 @@ package de.smederee.tickets import java.time._ -import java.util.{ Locale, UUID } +import java.util.Locale +import java.util.UUID import cats._ import cats.syntax.all._ @@ -26,7 +27,8 @@ import de.smederee.i18n.LanguageCode import de.smederee.security._ -import org.scalacheck.{ Arbitrary, Gen } +import org.scalacheck.Arbitrary +import org.scalacheck.Gen import scala.jdk.CollectionConverters._ diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelDescriptionTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelDescriptionTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelDescriptionTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelDescriptionTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class LabelDescriptionTest extends ScalaCheckSuite { given Arbitrary[LabelDescription] = Arbitrary(genLabelDescription) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelNameTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelNameTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelNameTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelNameTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class LabelNameTest extends ScalaCheckSuite { given Arbitrary[LabelName] = Arbitrary(genLabelName) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelTest.scala 2025-01-14 10:33:56.840018410 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/LabelTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -21,8 +21,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class LabelTest extends ScalaCheckSuite { given Arbitrary[Label] = Arbitrary(genLabel) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneDescriptionTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneDescriptionTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneDescriptionTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneDescriptionTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class MilestoneDescriptionTest extends ScalaCheckSuite { given Arbitrary[MilestoneDescription] = Arbitrary(genMilestoneDescription) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -21,8 +21,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class MilestoneTest extends ScalaCheckSuite { given Arbitrary[Milestone] = Arbitrary(genMilestone) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTitleTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTitleTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTitleTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/MilestoneTitleTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class MilestoneTitleTest extends ScalaCheckSuite { given Arbitrary[MilestoneTitle] = Arbitrary(genMilestoneTitle) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketContentTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketContentTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketContentTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketContentTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -18,8 +18,9 @@ package de.smederee.tickets import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class TicketContentTest extends ScalaCheckSuite { diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketFilterTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketFilterTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketFilterTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketFilterTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class TicketFilterTest extends ScalaCheckSuite { given Arbitrary[Submitter] = Arbitrary(genSubmitter) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketNumberTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketNumberTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketNumberTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketNumberTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -18,8 +18,9 @@ package de.smederee.tickets import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class TicketNumberTest extends ScalaCheckSuite { diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketResolutionTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketResolutionTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketResolutionTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketResolutionTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class TicketResolutionTest extends ScalaCheckSuite { given Arbitrary[TicketResolution] = Arbitrary(genTicketResolution) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketStatusTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketStatusTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketStatusTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketStatusTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -20,8 +20,9 @@ import de.smederee.tickets.Generators._ import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class TicketStatusTest extends ScalaCheckSuite { given Arbitrary[TicketStatus] = Arbitrary(genTicketStatus) diff -rN -u old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketTitleTest.scala new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketTitleTest.scala --- old-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketTitleTest.scala 2025-01-14 10:33:56.844018416 +0000 +++ new-smederee/modules/tickets/src/test/scala/de/smederee/tickets/TicketTitleTest.scala 2025-01-14 10:33:56.852018426 +0000 @@ -18,8 +18,9 @@ package de.smederee.tickets import munit._ -import org.scalacheck._ + import org.scalacheck.Prop._ +import org.scalacheck._ final class TicketTitleTest extends ScalaCheckSuite { diff -rN -u old-smederee/.scalafix.conf new-smederee/.scalafix.conf --- old-smederee/.scalafix.conf 2025-01-14 10:33:56.832018400 +0000 +++ new-smederee/.scalafix.conf 2025-01-14 10:33:56.844018416 +0000 @@ -2,6 +2,7 @@ DisableSyntax LeakingImplicitClassVal NoValInForComprehension + OrganizeImports ] DisableSyntax { @@ -19,3 +20,22 @@ noWhileLoops = true noXml = false } + +OrganizeImports { + blankLines = Auto + coalesceToWildcardImportThreshold = null + expandRelative = false + groupExplicitlyImportedImplicitsSeparately = false // No effect for Scala 3 + groupedImports = Explode // Have imports line by line to minimize merge conflicts. + groups = [ + "re:javax?\\." + "*" + "munit." + "org.scalacheck." + "scala." + ] + importSelectorsOrder = Ascii + importsOrder = Ascii + preset = DEFAULT + removeUnused = false // Workaround for Scala 3 +} diff -rN -u old-smederee/.scalafmt.conf new-smederee/.scalafmt.conf --- old-smederee/.scalafmt.conf 2025-01-14 10:33:56.832018400 +0000 +++ new-smederee/.scalafmt.conf 2025-01-14 10:33:56.844018416 +0000 @@ -6,11 +6,9 @@ maxColumn = 120 newlines.forceBeforeMultilineAssign = def project.excludeFilters = [".*\\.sbt"] -rewrite.rules = [Imports, RedundantBraces, RedundantParens] -rewrite.imports.sort = ascii +rewrite.rules = [RedundantBraces, RedundantParens] rewriteTokens = { "⇒" = "=>" "←" = "<-" "→" = "->" } -spaces.inImportCurlyBraces = true