mirror of
https://github.com/Karaka-Management/Developer-Guide.git
synced 2026-01-11 12:28:41 +00:00
Improve todo and formatting
This commit is contained in:
parent
bde2e37a0b
commit
dfbc71ece0
|
|
@ -49,11 +49,15 @@ Never use spaces between variables and atomic operations (e.g. `!`, `++`, `--`)
|
|||
Don't use whitespace inside ANY parentheses (e.g. functions, loops, conditions, catch, closures).
|
||||
|
||||
```js
|
||||
for (let i = 1; i < 100; ++i) { ... }
|
||||
for (let i = 1; i < 100; ++i) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
function(para1, para2) { ... }
|
||||
function(para1, para2) {
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### Brackets
|
||||
|
|
@ -70,13 +74,13 @@ Always use a whitespace between braces and keywords (e.g. else, while, catch, fi
|
|||
|
||||
```php
|
||||
try {
|
||||
|
||||
...
|
||||
} catch (...);
|
||||
```
|
||||
|
||||
```php
|
||||
if (...) {
|
||||
|
||||
...
|
||||
} else (...);
|
||||
```
|
||||
|
||||
|
|
@ -85,13 +89,14 @@ Braces are on the same line as the previous or following keyword except in class
|
|||
```php
|
||||
function()
|
||||
{
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
```php
|
||||
class Test
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -111,7 +116,7 @@ Always use braces even for potential one liners. The only exception is the terna
|
|||
|
||||
```php
|
||||
if (...) {
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -135,7 +140,7 @@ if (isTrue == true
|
|||
|| isFalse === false
|
||||
&& isNotTrue !== true
|
||||
) {
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -193,12 +198,18 @@ All string representations should use single quotes `''` unless `""` provides si
|
|||
|
||||
## Todos
|
||||
|
||||
Most issues should be documented in the code as todo and vice versa.
|
||||
Todos should be documented in the [PROJECT.md](https://github.com/Orange-Management/Docs/blob/master/Project/PROJECT.md).
|
||||
|
||||
In code todos can be created like this
|
||||
|
||||
```php
|
||||
// @todo: Single line todo
|
||||
```
|
||||
|
||||
```php
|
||||
/**
|
||||
* @todo Orange-Management/Repository#IssueNumber
|
||||
* Below comes the issue/todo description.
|
||||
* @todo:
|
||||
* Multi line todo
|
||||
* This way developers can see todos directly in the code without going to an external source.
|
||||
* Todos must not have empty lines in their descriptions.
|
||||
* If the external ressources have empty lines they must be removed in the todo comment.
|
||||
|
|
@ -207,4 +218,3 @@ Most issues should be documented in the code as todo and vice versa.
|
|||
*/
|
||||
```
|
||||
|
||||
The issue information can be used to provide additional information such as priority, difficulty and type.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user