Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

TiSpark Dev Tools Guide

Formatting

Scala Format

TiSpark checks Scalafmt before building in CI. In order to pass the check, please follow the instructions.

  1. In Intellij IDEA, you may import the scalafmt config file to Intellij following the instructions on Scalameta. If you want to format each time you save, please check the box of Reformat on file save.

  2. You may also run Scala format script before you commit & push to corresponding dev branch.

    ./dev/scalafmt

Java Format

TiSpark formats its code using Google-Java-Format Maven Plugin which follows Google's code styleguide. It is also checked on CI before build.

  1. In Intellij IDEA

    1. you should download the Google-Java-format Plugin via marketplace. Restart IDE, and enable google-java-format by checking the box in Other Settings.

    2. you may also use Java-Google-style xml file and export the schema to Intellij:

      Preferences->Editor->Code Style->Import Scheme->Intellij IDEA Code Style XML.

  2. You may also run Java format script before you commit & push to corresponding dev branch.

    ./dev/javafmt