blob: 295a8b2ed112a31b49e63994ffc71d76748ef33f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
Lua coding style for the graphdrawing library
=============================================
General naming rules and indentation:
* 2 spaces indentation
* variable_names_with_underscores
* namespaced.low_level_functions_with_underscores(foo, bar)
* CamelCaseClassNames
* CamelCaseClassNames.nameOfStaticFunctionLikeNewOrClone(foo, bar)
* CamelCaseClass:functionNamesLikeThis(foo, bar)
* never use global variables
* Use . for static functions and : for member functions
LuaDoc comments:
---
-- A function to do this and that.
--
-- @param first Description of the first parameter.
-- @param second Description of the second parameter.
--
-- @return This function returns something.
--
function myClass:myFunction(first, second)
...
end
|