Skip to content
This repository was archived by the owner on Dec 22, 2023. It is now read-only.

GUIDELINES

Sebas Veeke edited this page Sep 17, 2019 · 7 revisions

The following guidelines are part of Serverbot. Please review these guidelines before contributing.

1. Project guidelines

1.1 Release/publishing conventions

1.1.1 Version numbering

  • Loosely based on https://semver.org/, with the following specifics:
    • Version numbers are based on X.X.X where the X's are short for MAJOR.MINOR.PATCH.
    • MAJOR version number increases when breaking changes are being made.
    • MINOR version number increases when functionality is added or expanded.
    • PATCH version number increases when existing code is being improved (bug fixes, layout improvements, readability, small improvements etc.).

1.1.2 Suffixes after version 1.1.0

Simplified suffixes more or less based on the Debian GNU/Linux project:

  • Pre-release name is x.x.x-UNSTABLE.
  • Release name is x.x.x-STABLE.

1.1.3 Suffixes before version 1.1.0

  • Pre-release name is x.x.x-ALPHA.X.
  • Release candidate name is x.x.x-BETA.X.
  • Release name is x.x.x-RELEASE. Both ALPHA en BETA are pre-releases and therefor don't increase minor and patch version numbers. Instead they increment the .X after the tag.

1.2 Bash conventions

1.2.1 Spaces

  • Don't use tabs.
  • Use 4 spaces for indents.
  • Don't use trailing spaces.

1.2.2 Comments

  • Comments start with #.
  • Comments in software are all in lower case.
  • Comments in configuration or documentation files can contain capitals.

1.2.3 Variables

  • VARIABLES are in upper case.
  • MULTI_WORD_VARIABLES are split with underscores.

1.2.4 Functions

  • functions are in lower case.
  • multi_word_functions are split with a underscore.
  • functions are written as:
function function_name {
    function commands
}
  • Four spaces will be used for indentation.

1.2.5 If statements

  • Basic if statements are written as:
if [ "${VARIABLE}" == '0' ]; then
    echo "${VAR} is zero!"
fi
  • Four spaces will be used for indentation.