Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.4 KB

DEVELOPMENT.md

File metadata and controls

40 lines (30 loc) · 2.4 KB

Setting up development environment

Install the necessary build tools

You require to have latest stable Open JDK 8, latest stable Apache Maven and Git installed on your machine.

Set up IntelliJ IDEA

ScaleCube project team uses IntelliJ IDEA as the primary IDE, although we are fine with using other development environments as long as you adhere to our coding style.

Code style

ScaleCube project team uses Google code style

Note, in the past, we used an altered version of google code style. We now comply the google style guidelines fully

The best way to go is to format your code before pushing

You can use google-java-format. There are plugins for IntelliJ and Eclipse

IntelliJ Users (that doesn't want to install the plugin for some reason) should:

  1. Download this code style configuration Apply the configuration:

Eclipse Users (that doesn't want to install the plugin for some reason) should:

  1. Download this code style configuration Apply the configuration:
  2. Opening Eclipse settings varies per OS. For example, on macOS open Eclipse -> Preferences. On Ubuntu it's Window -> Preferences
  3. In the search bar on the left, type formatter, and select the Java -> Code Style -> Formatter menu item
  4. Click Import and browse to the XML file you have downloaded in Step 1.
  5. Ensure the GoogleStyle item is selected in the Active profile section.
  6. The import order should be empty: 0. Create a simple file with a single line in it 0=\# 0. Open Eclipse settings (same as above) 0. In the search bar on the left, type import, and select the Java -> Code Style -> Organize Imports menu item 0. Click Import and browse to the text file you have created in Step 1.

verifying style

Whatever you do, It's OK, as long as a maven build: mvn checkstyle:check -Dcheckstyle.config.location=google_checks.xml -Dcheckstyle.skip=false finishes successfully