Skip to content

Commit

Permalink
Resolve some deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
joan38 committed Feb 3, 2025
1 parent a7fb9f4 commit cfc1e3f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.goyeau.mill.scalafix

import com.goyeau.mill.scalafix.CoursierUtils
import coursier.core.Repository
import mill.Agg
import mill.scalalib.Dep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package com.goyeau.mill.scalafix

import com.goyeau.mill.scalafix.ScalafixModule.{filesToFix, fixAction}
import coursier.Repository
import mill.{Agg, T, Task}
import mill.{Agg, Command, T, Task}
import mill.api.{Logger, PathRef, Result}
import mill.scalalib.{Dep, ScalaModule}
import mill.define.Command

import scalafix.interfaces.ScalafixError.*

Expand Down Expand Up @@ -39,7 +38,7 @@ trait ScalafixModule extends ScalaModule {
/** Run Scalafix.
*/
def fix(args: String*): Command[Unit] =
T.command {
Task.Command {
fixAction(
T.ctx().log,
scalafixRepositories(),
Expand Down
8 changes: 4 additions & 4 deletions mill-scalafix/src/com/goyeau/mill/scalafix/StyleModule.scala
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package com.goyeau.mill.scalafix

import mill.T
import mill.define.Command
import mill.Task
import mill.Command
import mill.scalalib.scalafmt.ScalafmtModule

/** Combine Scalafmt and Scalafix together
*/
trait StyleModule extends ScalafmtModule with ScalafixModule {
def style(): Command[Unit] =
T.command {
Task.Command {
reformat()()
fix()()
}

def checkStyle(): Command[Unit] =
T.command {
Task.Command {
checkFormat()()
fix("--check")()
}
Expand Down

0 comments on commit cfc1e3f

Please sign in to comment.