mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(No Version Change)
Added coding convention item
This commit is contained in:
parent
3c6c270e68
commit
82ae968eda
3
inxi
3
inxi
|
@ -39,11 +39,14 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
#### CONVENTIONS:
|
#### CONVENTIONS:
|
||||||
#### Indentation: TABS
|
#### Indentation: TABS
|
||||||
|
#### Do not use `....`, those are totally non-reabable, use $(....)
|
||||||
#### Do not use one liner flow controls. The ONLY time you should use ; is in
|
#### Do not use one liner flow controls. The ONLY time you should use ; is in
|
||||||
#### this single case: if [[ condition ]];then (ie, never: [[ condition ]] && statement)
|
#### this single case: if [[ condition ]];then (ie, never: [[ condition ]] && statement)
|
||||||
|
####
|
||||||
#### All new code/methods must be in a function.
|
#### All new code/methods must be in a function.
|
||||||
#### For all boolean tests, use 'true' / 'false'. Do NOT use 0 or 1 unless
|
#### For all boolean tests, use 'true' / 'false'. Do NOT use 0 or 1 unless
|
||||||
#### it's a function return. Avoid complicated tests in the if condition itself.
|
#### it's a function return. Avoid complicated tests in the if condition itself.
|
||||||
|
####
|
||||||
#### VARIABLE/FUNCTION NAMING:
|
#### VARIABLE/FUNCTION NAMING:
|
||||||
#### All variables should explain what they are, except counters like i, j
|
#### All variables should explain what they are, except counters like i, j
|
||||||
#### All variables MUST be initialized / declared explicitly
|
#### All variables MUST be initialized / declared explicitly
|
||||||
|
|
Loading…
Reference in a new issue