Switch to Scalafmt in build
* AvoidInfix in scalafmt.conf * align.tokens in scalafmt.conf * scalafmt in MultiJvm * sbt-scalafmt 2.0.0-RC5 * scalafmt in all* command alias * scalafmtAll in CONTRIBUTING.md
This commit is contained in:
parent
18710d3aba
commit
e4d38f92a4
7 changed files with 66 additions and 38 deletions
|
|
@ -147,6 +147,13 @@ project akka-cluster
|
|||
multi-jvm:testOnly akka.cluster.SunnyWeather
|
||||
```
|
||||
|
||||
To format the Scala source code:
|
||||
```
|
||||
sbt
|
||||
akka-cluster/scalafmtAll
|
||||
akka-persistence/scalafmtAll
|
||||
```
|
||||
|
||||
### Do not use `-optimize` Scala compiler flag
|
||||
|
||||
Akka has not been compiled or tested with `-optimize` Scala compiler flag. (In sbt, you can specify compiler options in the `scalacOptions` key.)
|
||||
|
|
@ -360,7 +367,10 @@ In such situations we prefer 'internal' over 'impl' as a package name.
|
|||
|
||||
### Scala style
|
||||
|
||||
Akka uses [Scalariform](https://github.com/daniel-trinh/scalariform) to enforce some of the code style rules.
|
||||
Akka uses [Scalafmt](https://scalameta.org/scalafmt/docs/installation.html) to enforce some of the code style rules.
|
||||
|
||||
When IntelliJ detects the `.scalafmt.conf` and promts "Scalafmt configuration detected in this project" you should
|
||||
select "Continue using IntelliJ formatter" and instead install the [Scalafmt IntelliJ plugin](https://scalameta.org/scalafmt/docs/installation.html#intellij). Install the nightly plugin (until version 2.0.0 or later becomes stable) and enable "Format on save".
|
||||
|
||||
### Java style
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue