VPR-Docs/Docs/coding guide.md
2021-11-28 19:38:20 +01:00

1.0 KiB

1 Formatting

1.1 General

Maximal 80-100 letters in one line We use the default build in Formatter from 'IntelliJ IDEA' (Ctr+Alt+L)

1.2 Brackets

Brackets will be used like this:

public void example() {

}

1.3 Arrays

String[] array = new String[]{"1", "2", "3", "4"}

or

String[] array = new String[]{
    "1",
    "2", 
    "3", 
    "4"
}

2 Naming

2.1 General

Names should only include ASCII letters and digits. They should never begin with a digit.
All names should ALWAYS be in english.

2.2 Class names

Class names are written in UpperCamelCase.

2.3 Method names

Method names are written in lowerCamelCase.
They are often verbs describing the function of the method e.g. startProcess or log.

2.4 Constant names

Constant names are written in UPPER_CASE.

2.5 Variable names

Variable names are written in lowerCamelCase.
The names should ALWAYS be words that are descriptive.

2.6 File names

File names are written in lowerCameCase.