8000 Allows the ScalafmtModule to format build sources by hwielenberg · Pull Request #920 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allows the ScalafmtModule to format build sources #920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

hwielenberg
Copy link
Contributor

This allows that the MillScalafmtModule can be utilised to format the mill build sources (such as build.sc) as well.

Here is an example how a command can be created to trigger the formatting:

def buildSources: Sources = T.sources(os.pwd / "build.sc")

def fmtBuild(): Command[Unit] =
  T.command {
    MillScalafmtModule.reformatAll(Tasks(Seq(buildSources)))
  }

Copy link
Member
@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@lefou lefou merged commit 39812dd into com-lihaoyi:master Jul 2, 2020
@lefou lefou added this to the after 0.7.3 milestone Jul 2, 2020
@lefou
Copy link
Member
lefou commented Jul 2, 2020

Thank you!

Sign up for 5FDF free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0