Whitespace
Whitespace refers to indentation and line breaks.
Indentation
Indentation is always done with tabs, not spaces.
If you cannot tab, use 4 spaces.
do
do
do
-- Good indentation
end
end
end
Do not use unneeded indentation, and maintain indentation so that it matches the scope in best possible way.
Line breaks
Separate different sections of userdata and more with line breaks, as shown in juxtaposition.
The rule of thumb is to always prefer a line break when programming anything if it means your code becomes more readable (just don't be excessive about it).