Skip to content

Styleguide

If not explicitly stated otherwise, the following takes effect for all files:

  • character encoding utf-8
  • line endings with lf
  • indentation with 4 spaces
  • final new line

In general, it's a good idea to have a look into the yet existing code, to check how certain things were done up to now.

Java

The most important thing to say here is: opening braces are written into the next line.
(more to come if s.o. does s.th. differently I didn't think of)

Markdown

most important bullet points:

  • leave always an empty line above and beneath of lists. It may render fine in normal markdown viewers, but not in the MkDocs Pages docs (like this)

    Example

    bad:

    1
    2
    3
    4
    some text
    - bullet point
    - another item
    more normal text
    
    good:
    1
    2
    3
    4
    5
    6
    some text
    
    - bullet point
    - another item
    
    more normal text
    

  • if you insert a link, always write the link to the bottom of the file with an alias, ordered alphabetically.

    Example

    bad:

    1
    Look [here](https://www.coolsite.not/with/ultra/long/url) to read more about this.
    
    good:
    1
    2
    3
    Look [here][coolsite] to read more about this.
    
    [coolsite]: https://www.coolsite.not/with/ultra/long/url
    

  • split long sentences on punctuation and connection words like and & or.
    It will have the same appearance in viewers, but be much easier to maintain on code side.

    Example

    bad:

    1
    Some sentence that is very long, therefore it has punctuation and has absolutely no sense at all.
    

    Some sentence that is very long, therefore it has punctuation and has absolutely no sense at all.

    good:

    1
    2
    3
    Some sentence that is very long,
    therefore it has punctuation
    and has absolutely no sense at all.
    

    Some sentence that is very long, therefore it has punctuation and has absolutely no sense at all.

  • tables have to be formatted in code

    Example

    bad:

    1
    2
    3
    ||column 1|
    |:-|:-|
    |__row 1__|cell 1|
    

    good:

    1
    2
    3
    |           | column 1 |
    | :-------- | :------- |
    | __row 1__ | cell 1   |