docs: establish marqdo-lint architecture and examples
This commit is contained in:
1 parent
326c9bb119
commit
68b14db095
19 files changed
+1338
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<meta charset="utf-8">
|
||||
<title>Marqdo Lint Review Fixture</title>
|
||||
<body>
|
||||
<h1>@knowledge 定价文档</h1>
|
||||
<h2>@exec 计算折后价格</h2>
|
||||
<p>按<a href="#%E6%8A%98%E6%89%A3%E8%AE%BE%E8%AE%A1">折扣设计</a>计算金额。输入和输出都使用最小货币单位。</p>
|
||||
<p><code>params(原价: Int, 分子: Int, 分母: Int)</code></p>
|
||||
<p>先乘后除可以保持整数计算的确定性;调用者必须提供非零分母。</p>
|
||||
<p><strong>折后价格 = 原价 * 分子 // 分母</strong></p>
|
||||
<p>返回整数折后价格,除法向下截断。</p>
|
||||
<p><em>return 折后价格</em></p>
|
||||
<h2>@knowledge 折扣设计</h2>
|
||||
<p>这里可以自由使用<strong>加粗</strong>、<em>斜体</em>和 <code>code</code> 解释设计,不会产生执行语句。</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>约束</th>
|
||||
<th>原因</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>使用最小货币单位</td>
|
||||
<td>避免浮点金额误差</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>先乘后除</td>
|
||||
<td>明确整数截断位置</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user