All Projects → alenkacz → gradle-scalafmt

alenkacz / gradle-scalafmt

Licence: MIT license
Gradle plugin for scalafmt

Programming Languages

groovy
2714 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to gradle-scalafmt

pre-commit-hooks
Standardizing our code quality tooling 🛠️
Stars: ✭ 44 (+76%)
Mutual labels:  formatter, scalafmt
AdvancedHTMLParser
Fast Indexed python HTML parser which builds a DOM node tree, providing common getElementsBy* functions for scraping, testing, modification, and formatting. Also XPath.
Stars: ✭ 90 (+260%)
Mutual labels:  formatter
gradle-plugin-starter
Gradle plugin template project
Stars: ✭ 34 (+36%)
Mutual labels:  gradle-plugin
laravel-formatters
«‎Formatter» pattern for Laravel
Stars: ✭ 86 (+244%)
Mutual labels:  formatter
jsonfmt
Like gofmt, but for JSON files.
Stars: ✭ 70 (+180%)
Mutual labels:  formatter
Grazel
A tool to migrate Android projects from Gradle to Bazel incrementally and automatically
Stars: ✭ 222 (+788%)
Mutual labels:  gradle-plugin
gradle-cpd-plugin
Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Stars: ✭ 88 (+252%)
Mutual labels:  gradle-plugin
go-dump
Go-Dump is a Golang package which helps you to dump a struct.
Stars: ✭ 32 (+28%)
Mutual labels:  formatter
graphql-java-codegen-gradle-plugin
Gradle plugin for graphql-java-codegen
Stars: ✭ 19 (-24%)
Mutual labels:  gradle-plugin
spotbugs-gradle-plugin
plugins.gradle.org/plugin/com.github.spotbugs
Stars: ✭ 137 (+448%)
Mutual labels:  gradle-plugin
vscode-formatting-toggle
A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click.
Stars: ✭ 52 (+108%)
Mutual labels:  formatter
GradleMongoPlugin
Gradle plugin for running a managed instance of Mongo.
Stars: ✭ 48 (+92%)
Mutual labels:  gradle-plugin
rspec-tap-formatters
TAP Producer for RSpec-3
Stars: ✭ 20 (-20%)
Mutual labels:  formatter
plugin-pug
Prettier Pug Plugin
Stars: ✭ 163 (+552%)
Mutual labels:  formatter
gradle-http-plugin
Gradle plugin providing support for using HttpBuilder-NG to make HTTP requests as Gradle Tasks.
Stars: ✭ 30 (+20%)
Mutual labels:  gradle-plugin
gradle-j2cl-plugin
Gradle J2CL Plugin
Stars: ✭ 18 (-28%)
Mutual labels:  gradle-plugin
boost
Boost Maven and Gradle plugins for MicroProfile development
Stars: ✭ 27 (+8%)
Mutual labels:  gradle-plugin
harmonica
Kotlin Database Migration Tool. This tool makes it really easy to create table, index, add columns, and so on, with Kotlin DSL.
Stars: ✭ 123 (+392%)
Mutual labels:  gradle-plugin
gretty
Advanced gradle plugin for running web-apps on jetty and tomcat.
Stars: ✭ 116 (+364%)
Mutual labels:  gradle-plugin
moko-network
Network components with codegeneration of rest api for mobile (android & ios) Kotlin Multiplatform development
Stars: ✭ 107 (+328%)
Mutual labels:  gradle-plugin

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].