diff --git a/inxi b/inxi index aa9f1e5..f798760 100755 --- a/inxi +++ b/inxi @@ -41,6 +41,7 @@ #### Indentation: TABS #### 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) +#### All new code/methods must be in a function. #### 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. #### VARIABLE/FUNCTION NAMING: @@ -48,10 +49,11 @@ #### All variables MUST be initialized / declared explicitly ####, globals UPPER CASE, at top of script, SOME_VARIABLE='' (words separated by _ ). #### Locals always with: local some_variable= (lower case, words separated by _ ) +#### and at the top of the function. #### #### Booleans should start with b_ or B_ and state clearly what is being tested #### Arrays should start with a_ or A_ -#### All functions should follow standard naming, ie, verb subject noun, get_cpu_data +#### All functions should follow standard naming, ie, verb adjective noun, get_cpu_data ######################################################################## #### TESTING FLAGS #### inxi supports advanced testing triggers to do various things, using -!