30 lines
588 B
Markdown
30 lines
588 B
Markdown
|
# IndustrialTest coding style guidelines
|
||
|
## Indenting
|
||
|
You should use tabs for indentation.
|
||
|
|
||
|
## Naming convention
|
||
|
Use `lowerCamelCase` for functions, variables and table keys. Use `UPPER_SNAKE_CASE` for constants and `lower_snake_case` for filenames.
|
||
|
|
||
|
## Other
|
||
|
If table contains one element then it can be inlined:
|
||
|
```lua
|
||
|
someTable={element}
|
||
|
```
|
||
|
or:
|
||
|
```
|
||
|
someTable={key=element}
|
||
|
```
|
||
|
however if it contains more than one element then each element should go on separate line:
|
||
|
```lua
|
||
|
someTable={
|
||
|
element1,
|
||
|
element2
|
||
|
}
|
||
|
```
|
||
|
or:
|
||
|
```lua
|
||
|
someTable={
|
||
|
key=element1,
|
||
|
key2=element2
|
||
|
}
|
||
|
```
|