All Projects → tanishiking → Scalaunfmt

tanishiking / Scalaunfmt

Licence: mit
Generates the .scalafmt.conf that have minimum change to existing your scala codebase on running scalafmt.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Scalaunfmt

Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+2471.43%)
Mutual labels:  formatter
Vim Codefmt
Stars: ✭ 870 (+2385.71%)
Mutual labels:  formatter
Ec 471g
黑苹果配置 hackintosh dsdt clover v3489 e1 471g ec 471g v3 471g acer mac osx efi ssdt aml config plist hd4000 gt630m inter
Stars: ✭ 30 (-14.29%)
Mutual labels:  configuration
Config Rs
⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Stars: ✭ 915 (+2514.29%)
Mutual labels:  configuration
Vim Gofmt
Formats Go source code asynchronously with multiple Go formatters.
Stars: ✭ 11 (-68.57%)
Mutual labels:  formatter
Emacs.dz
Awesome emacs config files
Stars: ✭ 886 (+2431.43%)
Mutual labels:  configuration
Translatedjs
Internationalization and localization for JavaScript and Node.js
Stars: ✭ 17 (-51.43%)
Mutual labels:  formatter
Coldnew Emacs
coldnew's emacs config
Stars: ✭ 32 (-8.57%)
Mutual labels:  configuration
Kubevious
Kubevious - application centric Kubernetes UI and continuous assurance provider
Stars: ✭ 869 (+2382.86%)
Mutual labels:  configuration
Eryngii
[WIP] Erlang lint and formatter
Stars: ✭ 28 (-20%)
Mutual labels:  formatter
Configuron
Clojure(Script) config that reloads from project.clj when in dev mode
Stars: ✭ 24 (-31.43%)
Mutual labels:  configuration
Vim Clang Format
Vim plugin for clang-format, a formatter for C, C++, Obj-C, Java, JavaScript, TypeScript and ProtoBuf.
Stars: ✭ 837 (+2291.43%)
Mutual labels:  formatter
Gofmtrlx
(a bit) relaxed gofmt
Stars: ✭ 21 (-40%)
Mutual labels:  formatter
Hzdtf.foundation.framework
基础框架系统,支持.NET和.NET Core平台,语言:C#,DB支持MySql和SqlServer,主要功能有抽象持久化、服务层,将业务基本的增删改查抽离复用;提供代码生成器从DB生成实体、持久化、服务以及MVC控制器,每层依赖接口,并需要在客户端将对应实现层用Autofac程序集依赖注入,用AOP提供日志跟踪、事务、模型验证等。对Autofac、Redis、RabbitMQ封装扩展;DB访问提供自动主从访问,Redis客户端分区。特别适合管理系统。
Stars: ✭ 22 (-37.14%)
Mutual labels:  configuration
Cookbook
🎶 Cookbook for Nette Framework (@nette) & Contributte (@contributte). Read it while its HOT!
Stars: ✭ 30 (-14.29%)
Mutual labels:  configuration
Andhow
Strongly typed, validated, easy to use Java configuration
Stars: ✭ 17 (-51.43%)
Mutual labels:  configuration
Yamlsettings
Yaml Settings Configuration Module
Stars: ✭ 12 (-65.71%)
Mutual labels:  configuration
Lilconfig
Zero-dependency nodejs config seeker.
Stars: ✭ 35 (+0%)
Mutual labels:  configuration
Erl Env
Make retrieving configuration parameters super fast(7x faster than application:get_env)and stable.
Stars: ✭ 32 (-8.57%)
Mutual labels:  configuration
Cas Configserver Overlay
Generic CAS Spring Cloud Configuration Server WAR overlay
Stars: ✭ 28 (-20%)
Mutual labels:  configuration

scalaunfmt

Build Status Latest version Codacy Badge Scala Steward badge

scalaunfmt generates the .scalafmt.conf that have minimum change to existing scala codebase on running scalafmt. The candidate fields and values for resulting .scalafmt.conf can be controlled using configuration for scalaunfmt.

How to install

coursier bootstrap com.github.tanishiking:scalaunfmt_2.12:0.0.5 \
  -r sonatype:releases \
  -o scalaunfmt --standalone --main com.github.tanishiking.scalaunfmt.cli.Cli

Usage

Usage: scalaunfmt [options] [<file>...]

  <file>...              file or directory, in which case all *.scala files are formatted.
  -c, --config <value>   a file path to .scalaunfmt.conf (default: .scalaunfmt.conf).
  -v, --version <value>  running version of scalafmt
  -o, --output <value>   output file path (by default, scalaunfmt will write the result to stdout).

We can use any versions of scalafmt using -v option (scalaunfmt will download the jar for specified version of scalafmt using scalafmt-dynamic).

Configuration

The configuration for scalaunfmt looks like that for scalafmt, the difference is that the configuration for scalaunfmt requires the list of values on the right-hand side (instead of specific value). scalaunfmt will generate the multiple configurations for scalafmt using the combinations of rhs of scalaunfmt conf.

For example,

maxColumn = [80, 100]
align = [none, some]

scalaunfmt will generate the following list of scalafmt conf from the above one, and choose the best one that minimize the change to existing scala codebase.

maxColumn = 80
align = none
maxColumn = 80
align = some
maxColumn = 100
align = none
maxColumn = 100
align = more

More examples

For the available list of fields and values for .scalafmt.conf, refer https://scalameta.org/scalafmt/docs/configuration.html

continuationIndent.callSite = [2, 4]
continuationIndent.defnSite = [2, 4]
rewrite.rules = [
  [
    AvoidInfix
    RedundantBraces
  ]
  [
    AvoidInfix
  ]
]
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].