summaryrefslogtreecommitdiff
path: root/static/freebsd/man9/style.lua.9 3.html
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:59:05 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:59:05 -0400
commit1f19f33e45791ea59aed048796fc68672c6723a5 (patch)
tree54625fba89e91d1c2177801ec635e8528bba937f /static/freebsd/man9/style.lua.9 3.html
parentac5e55f5f2af5b92794c2aded46c6bae85b5f5ed (diff)
docs: Removed Precompiled HTML
Diffstat (limited to 'static/freebsd/man9/style.lua.9 3.html')
-rw-r--r--static/freebsd/man9/style.lua.9 3.html101
1 files changed, 0 insertions, 101 deletions
diff --git a/static/freebsd/man9/style.lua.9 3.html b/static/freebsd/man9/style.lua.9 3.html
deleted file mode 100644
index 94053bfd..00000000
--- a/static/freebsd/man9/style.lua.9 3.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<table class="head">
- <tr>
- <td class="head-ltitle">STYLE.LUA(9)</td>
- <td class="head-vol">Kernel Developer's Manual</td>
- <td class="head-rtitle">STYLE.LUA(9)</td>
- </tr>
-</table>
-<div class="manual-text">
-<section class="Sh">
-<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
-<p class="Pp"><code class="Nm">style.lua</code> &#x2014;
- <span class="Nd"><span class="Ux">FreeBSD</span> lua file style
- guide</span></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
-<p class="Pp">This file specifies the preferred style for lua source files in
- the <span class="Ux">FreeBSD</span> source tree. Many of the style rules are
- implicit in the examples. Be careful to check the examples before assuming
- that <code class="Nm">style.lua</code> is silent on an issue.</p>
-<p class="Pp">The copyright header should be a series of single-line comments.
- Use the single-line comment style for every line in a multi-line
- comment.</p>
-<p class="Pp">After any copyright header there is a blank line.</p>
-<p class="Pp" id="require">The preferred method of including other files and
- modules is with
- <a class="permalink" href="#require"><code class="Fn">require</code></a>(<var class="Fa">name</var>),
- such as:</p>
-<div class="Bd Pp Li">
-<pre>-- License block
-
-config = require(&quot;config&quot;);
-menu = require(&quot;menu&quot;);
-password = require(&quot;password&quot;);
--- One blank line following the module require block</pre>
-</div>
-<p class="Pp" id="include"><a class="permalink" href="#include"><code class="Fn">include</code></a>()
- is generally avoided.</p>
-<p class="Pp">Indentation and wrapping should match the guidelines provided by
- <a class="Xr">style(9)</a>. Do note that it is ok to wrap much earlier than
- 80 columns if readability would otherwise suffer.</p>
-<p class="Pp" id="s:method">Where possible,
- <a class="permalink" href="#s:method"><code class="Fn">s:method</code></a>(<var class="Fa">...</var>)
- is preferred to
- <a class="permalink" href="#method"><code class="Fn" id="method">method</code></a>(<var class="Fa">s</var>,
- <var class="Fa">...</var>). This is applicable to objects with methods.
- String are a commonly-used example of objects with methods.</p>
-<p class="Pp">Testing for <var class="Va">nil</var> should be done explicitly,
- rather than as a boolean expression. Single-line conditional statements and
- loops should be avoided.</p>
-<p class="Pp"><code class="Ic">local</code> variables should be preferred to
- global variables in module scope. internal_underscores tend to be preferred
- for variable identifiers, while camelCase tends to be preferred for function
- identifiers.</p>
-<p class="Pp">If a table definition spans multiple lines, then the final value
- in the table should include the optional terminating comma. For example:</p>
-<div class="Bd Pp Li">
-<pre>-- No terminating comma needed for trivial table definitions
-local trivial_table = {1, 2, 3, 4}
-
-local complex_table = {
- {
- id = &quot;foo&quot;,
- func = foo_function, -- Trailing comma preferred
- },
- {
- id = &quot;bar&quot;,
- func = bar_function,
- }, -- Trailing comma preferred
-}</pre>
-</div>
-<p class="Pp">This reduces the chance for errors to be introduced when modifying
- more complex tables.</p>
-<p class="Pp" id="and">Multiple local variables should not be declared
- <a class="permalink" href="#and"><b class="Sy">and</b></a> initialized on a
- single line. Lines containing multiple variable declarations without
- initialization are ok. Lines containing multiple variable declarations
- initialized to a single function call returning a tuple with the same number
- of values is also ok.</p>
-<p class="Pp" id="should">Initialization
- <a class="permalink" href="#should"><b class="Sy">should</b></a> be done at
- declaration time as appropriate.</p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
- ALSO</a></h1>
-<p class="Pp"><a class="Xr">style(9)</a></p>
-</section>
-<section class="Sh">
-<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
-<p class="Pp">This manual page is inspired from the same source as
- <a class="Xr">style(9)</a> manual page in
- <span class="Ux">FreeBSD</span>.</p>
-</section>
-</div>
-<table class="foot">
- <tr>
- <td class="foot-date">February 25, 2018</td>
- <td class="foot-os">FreeBSD 15.0</td>
- </tr>
-</table>