diff options
Diffstat (limited to 'examples/scalafmt-example/README.md')
-rw-r--r-- | examples/scalafmt-example/README.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/scalafmt-example/README.md b/examples/scalafmt-example/README.md new file mode 100644 index 0000000..0a59f96 --- /dev/null +++ b/examples/scalafmt-example/README.md @@ -0,0 +1,16 @@ +This example shows integration with scalafmt plugin. + +Reformat executed on every `cbt compile` call, and affects only *.scala source files. + +You can provide your custom scalfmt preferences in build via `scalafmtConfig`. + +To see formatting in action: execute `cbt breakFormatting` to break formatting and then execute`cbt scalafmt` to get formatting back. + +To check if your code is properly formatted(for example as part of CI validation), you can execute: + +``` +cbt scalafmt +git diff --exit-code +``` + +Last command will return non-zero code, if your code isn't properly formatted. |