Skip to content

Commit daaade4

Browse files
committed
Fixed markdownlint errors
1 parent 1ec7362 commit daaade4

28 files changed

+236
-250
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
The command-line tool for quick, simple deployment and management of Linux dedicated game servers.
66

7-
* User docs: [docs.linuxgsm.com](https://docs.linuxgsm.com)
8-
* Dev Docs: [dev-docs.linuxgsm.com](https://dev-docs.linuxgsm.com)
7+
- User docs: [docs.linuxgsm.com](https://docs.linuxgsm.com)
8+
- Dev Docs: [dev-docs.linuxgsm.com](https://dev-docs.linuxgsm.com)
99

1010
## Introduction
1111

1212
Welcome to the LinuxGSM developer documentation that covers how to get started, tooling, workflow, best practices, and code standards.
1313

14-
If you want to contribute to LinuxGSM and need assistance feel free to pop on the LinuxGSM [Discord ](https://linuxgsm.com/discord)and have a chat with some of the contributors.
14+
If you want to contribute to LinuxGSM and need assistance feel free to pop on the LinuxGSM [Discord](https://linuxgsm.com/discord)and have a chat with some of the contributors.
1515

1616
## Work in Progress
1717

SUMMARY.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
# Table of contents
22

3-
* [Home](README.md)
3+
- [Home](README.md)
44

55
## Getting Started
66

7-
* [Getting Started](getting-started/feature-development-quick-guide.md)
8-
* [Programming Language](getting-started/programming-language.md)
9-
* [Development Software](getting-started/development-software.md)
10-
* [Test Environment](getting-started/test-environment.md)
11-
* [Developer Commands](getting-started/developer-commands.md)
12-
* [Adding a new Game Server](getting-started/adding-a-new-game-server.md)
7+
- [Getting Started](getting-started/feature-development-quick-guide.md)
8+
- [Programming Language](getting-started/programming-language.md)
9+
- [Development Software](getting-started/development-software.md)
10+
- [Test Environment](getting-started/test-environment.md)
11+
- [Developer Commands](getting-started/developer-commands.md)
12+
- [Adding a new Game Server](getting-started/adding-a-new-game-server.md)
1313

1414
## Workflow
1515

16-
* [Semantic Versioning](workflow/semantic-versioning.md)
17-
* [Workflow](workflow/workflow.md)
18-
* [Agile](workflow/agile.md)
19-
* [Pull Requests](workflow/branching.md)
20-
* [Gitflow](workflow/gitflow.md)
21-
* [Conventional Commits](workflow/conventional-commits.md)
22-
* [Unit Tests](workflow/unit-tests.md)
16+
- [Semantic Versioning](workflow/semantic-versioning.md)
17+
- [Workflow](workflow/workflow.md)
18+
- [Agile](workflow/agile.md)
19+
- [Pull Requests](workflow/branching.md)
20+
- [Gitflow](workflow/gitflow.md)
21+
- [Conventional Commits](workflow/conventional-commits.md)
22+
- [Unit Tests](workflow/unit-tests.md)
2323

2424
## Technical
2525

26-
* [Main Executable](technical/main-executable.md)
27-
* [Commands](technical/commands.md)
28-
* [Exit Codes](technical/exit-codes.md)
29-
* [Functions](technical/functions.md)
30-
* [Modules](technical/modules.md)
31-
* [Fixes](technical/modules/fixes.md)
32-
* [Core](technical/modules/core.md)
33-
* [Game Server Querying](technical/game-server-querying.md)
34-
* [Messages & Logs](technical/messages-and-logs.md)
35-
* [Checks](technical/checks.md)
36-
* [Exit](technical/exit.md)
37-
* [Install](technical/install.md)
38-
* [Debuggins](technical/debuggins.md)
26+
- [Main Executable](technical/main-executable.md)
27+
- [Commands](technical/commands.md)
28+
- [Exit Codes](technical/exit-codes.md)
29+
- [Functions](technical/functions.md)
30+
- [Modules](technical/modules.md)
31+
- [Fixes](technical/modules/fixes.md)
32+
- [Core](technical/modules/core.md)
33+
- [Game Server Querying](technical/game-server-querying.md)
34+
- [Messages & Logs](technical/messages-and-logs.md)
35+
- [Checks](technical/checks.md)
36+
- [Exit](technical/exit.md)
37+
- [Install](technical/install.md)
38+
- [Debuggins](technical/debuggins.md)
3939

4040
## Code Standards
4141

42-
* [Style Guide](code-standards/style-guide.md)
43-
* [Shellcheck Linter](code-standards/shellcheck-linter.md)
44-
* [Text Editor Settings](code-standards/text-editor-settings.md)
42+
- [Style Guide](code-standards/style-guide.md)
43+
- [Shellcheck Linter](code-standards/shellcheck-linter.md)
44+
- [Text Editor Settings](code-standards/text-editor-settings.md)

code-standards/shellcheck-linter.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Shellcheck Linter
22

33
\[WIP\]
4-

code-standards/style-guide.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Here are some of them.
55

66
## Variables
77

8-
#### Naming variables
8+
### Naming variables
99

1010
Variables should be made of lowercase letters only and should be descriptive enough to understand its purpose (even if the variable is longer that preferred).
1111

@@ -25,7 +25,7 @@ Variable should always be called between brackets and double quotes to prevent g
2525
echo "${var}"
2626
```
2727

28-
### Directories
28+
## Directories
2929

3030
Directories are called using LinuxGSM directories variables, or relative to those. Common directory variables can be found in `linuxgsm.sh` and `_default.cfg` .
3131

@@ -42,15 +42,15 @@ find "${executabledir}/bin"
4242

4343
If statements should look like the following
4444

45-
```
45+
```bash
4646
if [ "${shortname}" == "csgo" ];then
4747
# content
4848
fi
4949
```
5050

5151
if statements with multiple options like so
5252

53-
```
53+
```bash
5454
if [ "${shortname}" == "csgo" ]||[ "${shortname}" == "css" ]; then
5555
# content
5656
fi
@@ -60,9 +60,9 @@ fi
6060

6161
### Syntax
6262

63-
* The `if [ statement ]; then` should be a one-liner operation.
64-
* Signs comparators like `==`, `lt`, `lt` etc. are preferred to `-eq`, `-le`, `-lt`.
65-
* Anything within an if statement must be tabulated one step deeper.
63+
- The `if [ statement ]; then` should be a one-liner operation.
64+
- Signs comparators like `==`, `lt`, `lt` etc. are preferred to `-eq`, `-le`, `-lt`.
65+
- Anything within an if statement must be tabulated one step deeper.
6666

6767
Example:
6868

@@ -74,7 +74,7 @@ fi
7474

7575
### Expression Standards
7676

77-
Common if expressions LinuxGSM uses. More expressions [here](http://tldp.org/LDP/Bash-Beginners-Guide/html/sect\_07\_01.html).
77+
Common if expressions LinuxGSM uses. More expressions [here](http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html).
7878

7979
| Expression | Description |
8080
| ---------- | ------------------------------------ |
@@ -109,7 +109,7 @@ if [ -z "${var}" ]; then
109109
fi
110110
```
111111

112-
```
112+
```bash
113113
var=""
114114
# OR
115115
var="set"
@@ -118,7 +118,7 @@ if [ -v var ]; then
118118
fi
119119
```
120120

121-
```
121+
```bash
122122
# var is missing
123123
if [ ! -v var ]; then
124124
# Variable does not exist
@@ -127,8 +127,8 @@ fi
127127

128128
## Loops
129129

130-
* Loops should be a one liner statement.
131-
* Anything within a loop must be tabulated one step deeper.
130+
- Loops should be a one liner statement.
131+
- Anything within a loop must be tabulated one step deeper.
132132

133133
```bash
134134
while [ "${var}" < "${cap}" ]; do
@@ -139,17 +139,17 @@ done
139139

140140
## Comments
141141

142-
As English is not always the native language of a developer, comments should use a formal writing style and be straight to the point. If unsure this short formal writing [guide](http://www2.ivcc.edu/rambo/tip\_formal\_writing\_voice.htm) will help.
142+
As English is not always the native language of a developer, comments should use a formal writing style and be straight to the point. If unsure this short formal writing [guide](http://www2.ivcc.edu/rambo/tip_formal_writing_voice.htm) will help.
143143

144144
```bash
145145
# Using comments help developers understand complex code, but should be used sparingly.
146146
```
147147

148148
## Functions
149149

150-
* Function should be named starting with `fn_` and using lowercase letters only.
151-
* Any recurrent task should be put into a function.
152-
* Anything within a function must be tabulated one step deeper.
150+
- Function should be named starting with `fn_` and using lowercase letters only.
151+
- Any recurrent task should be put into a function.
152+
- Anything within a function must be tabulated one step deeper.
153153

154154
Example:
155155

@@ -161,56 +161,56 @@ fn_myfunction(){
161161

162162
## Messages
163163

164-
* Messages should be given using core\_messages.sh forms
165-
* Additional information messages are given in the form of `echo -e " * Message here"`
164+
- Messages should be given using core_messages.sh forms
165+
- Additional information messages are given in the form of `echo -e " * Message here"`
166166

167167
## Automated Messages
168168

169-
Automated messages are used with any commands that are non-interactive. Examples of this include Start, Stop and Monitor. There are various different alert messages available see [Exit-Codes](broken-reference) for details.
169+
Automated messages are used with any commands that are non-interactive. Examples of this include Start, Stop and Monitor. There are various different alert messages available see [Exit-Codes](../technical/exit-codes.md) for details.
170170

171171
Each automated message starts with `fn_print_dots` to show a process is happening but with no known outcome.
172172

173-
`fn_print_dots`
173+
### `fn_print_dots`
174174

175-
```
175+
Once an outcome of a process is known the message uses an outcome message like `fn_print_ok` or `fn_print_fail`
176+
177+
```text
176178
[ .... ] Starting fctrserver:
177179
```
178180

179-
Once an outcome of a process is known the message uses an outcome message like `fn_print_ok` or `fn_print_fail`
181+
### `fn_print_ok`
180182

181-
fn\_print\_ok
182-
183-
```
183+
```text
184184
[ OK ] Starting fctrserver: Factorio Server
185185
```
186186

187187
The option of a newline is also available by appending `_nl` for example `fn_print_ok_nl`. This will add a carriage return to the message preventing it being overwritten by the next message.
188188

189-
```
189+
```text
190190
[ OK ] Stopping fctrserver: Graceful: CTRL+c: 2: OK
191191
[ .... ] Starting fctrserver: Factorio Server
192192
```
193193

194-
#### Characteristics
194+
### Characteristics of Automated Messages
195195

196-
Interactive messages contain extra detail at the begining of the message that is pre-populated. Full stops must `not` be used with this type of message.
196+
Automated messages contain extra detail at the begining of the message that is pre-populated. Full stops must `not` be used with this type of message.
197197

198-
### Interactive Messages
198+
## Interactive Messages
199199

200200
Interactive messages are used with any commands that have interactive elements. Examples of this include Install, console and debug. There are various different alert messages available see \[\[Exit-Codes]] for details.
201201

202-
```
202+
```text
203203
Warning! If fctrserver is already running it will be stopped.
204204
```
205205

206206
standard echo commands are normally used to supplement an alert or if an alert is not required. Bullet points can also be used
207207

208-
```
208+
```bash
209209
Information! Press "CTRL+b" then "d" to exit console.
210210
Warning! Do NOT press CTRL+c to exit.
211211
* https://docs.linuxgsm.com/commands/console
212212
```
213213

214-
#### Characteristics
214+
### Characteristics of Interactive Messages
215215

216216
Treat interactive messages as a standard sentence. All messages must begin with a capital and end with a full stop

code-standards/text-editor-settings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: '[WIP] discuss using LF and white space remover etc.'
2+
description: "[WIP] discuss using LF and white space remover etc."
33
---
44

55
# Text Editor Settings
@@ -20,7 +20,7 @@ For more info about line endings check out the article "[The Great Newline Schis
2020

2121
When developing code sometimes it can be easy to end up with trailing white spaces. as shown below.
2222

23-
```
23+
```bash
2424
fn_example_func(){
2525
# The line below has two spaces after its final character
2626
code••

getting-started/adding-a-new-game-server.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ Adding a new game server is one of the most common things developers do. This gu
66
replace gameserver with the name of the new server e.g rustserver
77
{% endhint %}
88

9-
### Create new \_default.cfg config file
9+
## Create new \_default.cfg config file
1010

1111
Firstly create a new `_default.cfg` file in `lgsm/config-default/config-lgsm/gameserver` . An existing \_default.cfg file can be used as a template.
1212

1313
Update all the variables in the new `_default.cfg` file to fit the new server.
1414

1515
Some common variables that will need updating:
1616

17-
* Add `## SteamCMD Login` section only if required.
18-
* `startparameters` are any parameters the executable requires to run the game server.
19-
* `appid` used to download a game server from Steam. Remove if not using steam.
20-
* `steammaster` used if the game servers are listed on the Steam master servers.
21-
* `stopmode` defines how a server can safely exit.
22-
* `querymode` defines the type of query monitor that can be used to check the server is responding.
23-
* console type highlights to users if the console outputs and is interactive.
24-
* Game Server Details `gamename` , `engine`, `glibc`.
25-
* Various directory and config variables.
17+
- Add `## SteamCMD Login` section only if required.
18+
- `startparameters` are any parameters the executable requires to run the game server.
19+
- `appid` used to download a game server from Steam. Remove if not using steam.
20+
- `steammaster` used if the game servers are listed on the Steam master servers.
21+
- `stopmode` defines how a server can safely exit.
22+
- `querymode` defines the type of query monitor that can be used to check the server is responding.
23+
- console type highlights to users if the console outputs and is interactive.
24+
- Game Server Details `gamename` , `engine`, `glibc`.
25+
- Various directory and config variables.
2626

2727
## Add the new server to serverlist.csv
2828

@@ -32,10 +32,10 @@ Add the new server details to `serverlist.csv` as well as add any dependency req
3232

3333
Some game servers require alterations before they can start common examples include:
3434

35-
* copying library files to serverfiles
36-
* symlinking files
37-
* creating directories
38-
* adding a directory to `LD_LIBRARY_PATH`
35+
- copying library files to serverfiles
36+
- symlinking files
37+
- creating directories
38+
- adding a directory to `LD_LIBRARY_PATH`
3939

4040
If this is required a fix module will need to be created.
4141

@@ -71,4 +71,3 @@ Not all game servers use SteamCMD. If this is the case a custom update module wi
7171
## Custom Commands
7272

7373
Some game servers may require bespoke commands to complete tasks. Examples of this include Teamspeak 3 and Unreal Tournament 2004. Take a look at the `core_getopts.sh` module for examples of how to add commands.
74-

getting-started/developer-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LinuxGSM provides commands to help developers gather information about the game
1212
| Query Raw | `./gameserver query-raw` | `./gameserver qr` |
1313
| Clear Functions | `./gameserver clear-modules` | `./gameserver cm` |
1414

15-
### Developer
15+
## Developer
1616

1717
The `developer` command enables development mode allowing access to all hidden developer commands.&#x20;
1818

@@ -27,7 +27,7 @@ This command also enables dev debug that outputs everything LinuxGSM is doing to
2727

2828
Detects variables that are set up to be displayed in details.
2929

30-
```
30+
```bash
3131
./gameserver detect-details
3232
./gameserver ddt
3333
```

0 commit comments

Comments
 (0)