• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

alenkacz/gradle-scalafmt: Gradle plugin for scalafmt

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

alenkacz/gradle-scalafmt

开源软件地址(OpenSource Url):

https://github.com/alenkacz/gradle-scalafmt

开源编程语言(OpenSource Language):

Groovy 99.1%

开源软件介绍(OpenSource Introduction):

Scalafmt Gradle plugin

Build Status Download

This plugin will allow you to format your scala code as a part of your build process. In the background, it uses scalafmt library.

You can use scalafmt plugin without any configuration. Then defaults from scalafmt will be used. You can adjust these settings by putting .scalafmt.conf to the root of your project. For the supported format and properties see the scalafmt page

We are using scalafmt-dynamic which allows people to choose their scalafmt version inside scalafmt config. As a default, we're still sticking to the last stable version. E.g. to try out this plugin with non-stable 2.0.0-RC4 release, just put version = "2.0.0-RC4" into your scalafmt config.

Usage

plugins {
	id 'cz.alenkacz.gradle.scalafmt' version '$latestVersion'
}

scalafmt {
    // .scalafmt.conf in the project root is default value, provide only if other location is needed
    // config file has to be relative path from current project or root project in case of multimodule projects
    // example usage: 
    // configFilePath = ".scalafmt.conf"
}

Tasks

Tasks added to your project when applying this plugin:

  • scalafmt - formats your scala and sbt source code (main sourceset only)
  • checkScalafmt - checks whether all files are correctly formatted, if not, the task fails (main sourceset only)
  • testScalafmt - formats your test scala code based on the provided configuration
  • checkTestScalafmt - checks whether your test scala code is correctly formatted
  • scalafmtAll - formats scala code from all source sets
  • checkScalafmtAll - checks formatting of all source sets



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap