Skip to content

Commit

Permalink
Fix markdown format
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoisl committed Oct 11, 2019
1 parent 0e8293d commit 8264606
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions guidelines.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#Code guidelines, formatting and naming conventions
# Code guidelines, formatting and naming conventions
The following conventions should be considered when contributing to the plugin. It greatly helps to read through the code as well as reduce merge conflicts due to different style guides.

##Formatting conventions
###Indentation
## Formatting conventions
### Indentation
Please use spaces as tab policy with an indentation size of 4.

###Imports
### Imports
Import statements should be sorted alphabetical to prevent double imports.

###Brackets
### Brackets
Opening brackets should be placed in the same line as the class/method implementation. See example
```Java
class TestClass{
Expand All @@ -18,43 +18,42 @@ class TestClass{
}
```

###Comments
### Comments
Comments are mandatory ;)
####Single-Line-comments
#### Single-Line-comments
```Java
//This is a Single-line comment for the following line
String test="";
String test2=""; //This is a Single-line comment for the statement in the same line (aka Trailing comment)
```
Single-line comments are used to describe certain line of codes. They can be placed right before the line or in the same line after the statement.
####Block-comments
#### Block-comments
```Java
/*This is a block comment
with multiple lines*/
```
Block comments are used to provide descriptive information of files and methods. They may be used at the beginning of each file and before each method, but can also be used in other places, such as inside methods.
Block comments inside a function or method should be indented to the same level as the code they describe.

##Naming conventions
## Naming conventions

##Constants
## Constants
Use upper case with underscore spacing where necessary.
```Java
final String THIS_IS_A_CONSTANT="TestValue";
```
##Classes
## Classes
Class names should be nouns in PascalCase (UpperCamelCase), with the first letter of every word capitalised. Use whole words - avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form) Filename must match the class name.
```Java
class StringUtil...
class FileUtil...
```

##Methods
## Methods
Methods should be verbs in lowerCamelCase or a multi-word name that begins with a verb in lowercase.
```Java
static String appendQuote(...)...
static String splitPath(...)...
```

##Variables

## Variables

0 comments on commit 8264606

Please sign in to comment.