summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-16 03:03:27 +0000
committerNorbert Preining <norbert@preining.info>2023-01-16 03:03:27 +0000
commit6f9e1680085e7bb4d258f6f8116369d122e196e1 (patch)
tree9ac0ecb239240d1d672b188f29c1479de215074b /graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE
parentb8345f39630408bb198e7636381ce4240154ca9b (diff)
CTAN sync 202301160303
Diffstat (limited to 'graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE')
-rw-r--r--graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE27
1 files changed, 27 insertions, 0 deletions
diff --git a/graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE b/graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE
new file mode 100644
index 0000000000..295a8b2ed1
--- /dev/null
+++ b/graphics/pgf/base/tex/generic/graphdrawing/lua/LUA_CODING_STYLE
@@ -0,0 +1,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