🎨 style(md): lint and format all Markdown files

- Update .markdownlint.json: disable MD024 (duplicate headings) and MD025 (multiple h1)
  - MD024: test cases intentionally use duplicate headings for test IDs
  - MD025: function catalog files use multiple h1 for different function groups
- Fix MD040: add language identifiers to fenced code blocks in test/agent/README.md
- Fix MD031: add blank lines around fenced code blocks
- Run prettier to format all Markdown files consistently
- Fix table alignment and spacing issues

All markdownlint errors are now resolved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
csh 2026-06-21 17:37:29 +08:00
parent 0dc244f1b4
commit 565071c11f
15 changed files with 76 additions and 52 deletions

View File

@ -1,4 +1,6 @@
{ {
"default": true, "default": true,
"MD013": false "MD013": false,
"MD024": false,
"MD025": false
} }

View File

@ -22,7 +22,7 @@
## 分类目录 ## 分类目录
| 分类 | 详情页 | 函数事实数 | | 分类 | 详情页 | 函数事实数 |
| -------------------------- | -------------------------------------------------------------------------------------------------------- | ---------: | | -------------------------- | ---------------------------------------------------------------------------------------------- | ---------: |
| 系统参数名称函数 | [datawarehouse/01_system_param_names.md](datawarehouse/01_system_param_names.md) | 17 | | 系统参数名称函数 | [datawarehouse/01_system_param_names.md](datawarehouse/01_system_param_names.md) | 17 |
| 多市场支撑函数 | [datawarehouse/02_multi_market.md](datawarehouse/02_multi_market.md) | 5 | | 多市场支撑函数 | [datawarehouse/02_multi_market.md](datawarehouse/02_multi_market.md) | 5 |
| 日内数据与收盘后可用 | [datawarehouse/05_intraday_and_after_close.md](datawarehouse/05_intraday_and_after_close.md) | 2 | | 日内数据与收盘后可用 | [datawarehouse/05_intraday_and_after_close.md](datawarehouse/05_intraday_and_after_close.md) | 2 |

View File

@ -161,6 +161,7 @@
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 | | 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
| -------- | ------ | ---- | -------- | -------------------------------------------- | | -------- | ------ | ---- | -------- | -------------------------------------------- |
| 1 | `arg1` | 是 | 整数 | 按源文档示例顺序传入;示例参数形态为 `46002` | | 1 | `arg1` | 是 | 整数 | 按源文档示例顺序传入;示例参数形态为 `46002` |
# 数据仓库金融函数 - 条件判定 # 数据仓库金融函数 - 条件判定
文档类型:函数事实页 文档类型:函数事实页

View File

@ -16,6 +16,7 @@
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 | | 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
| -------- | ------ | ---- | -------- | ---------------------------------------- | | -------- | ------ | ---- | -------- | ---------------------------------------- |
| 1 | `arg1` | 是 | 整数 | 按源文档示例顺序传入;示例参数形态为 `0` | | 1 | `arg1` | 是 | 整数 | 按源文档示例顺序传入;示例参数形态为 `0` |
# 数据仓库金融函数 - 盘后相关(在当日可用于盘中) # 数据仓库金融函数 - 盘后相关(在当日可用于盘中)
文档类型:函数事实页 文档类型:函数事实页

View File

@ -35,6 +35,7 @@
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 | | 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
| -------- | ------ | ---- | -------- | ---- | | -------- | ------ | ---- | -------- | ---- |
# 数据仓库金融函数 - 复权基准日函数 # 数据仓库金融函数 - 复权基准日函数
文档类型:函数事实页 文档类型:函数事实页

View File

@ -102,6 +102,7 @@
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 | | 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
| -------- | ------ | ---- | -------- | -------------------------------------------- | | -------- | ------ | ---- | -------- | -------------------------------------------- |
| 1 | `arg1` | 是 | 字符串 | 按源文档示例顺序传入;示例参数形态为 `'1+3'` | | 1 | `arg1` | 是 | 字符串 | 按源文档示例顺序传入;示例参数形态为 `'1+3'` |
# 数据仓库金融函数 - 查询和轮询函数 # 数据仓库金融函数 - 查询和轮询函数
文档类型:函数事实页 文档类型:函数事实页

View File

@ -105,6 +105,7 @@
| 1 | `expression` | 是 | 表达式对象 | 按源文档示例顺序传入;示例参数形态为 `@close()` | | 1 | `expression` | 是 | 表达式对象 | 按源文档示例顺序传入;示例参数形态为 `@close()` |
| 2 | `date_value_2` | 是 | 日期或时间值 | 按源文档示例顺序传入;示例参数形态为 `20230101T` | | 2 | `date_value_2` | 是 | 日期或时间值 | 按源文档示例顺序传入;示例参数形态为 `20230101T` |
| 3 | `date_value_3` | 是 | 日期或时间值 | 按源文档示例顺序传入;示例参数形态为 `20230110T` | | 3 | `date_value_3` | 是 | 日期或时间值 | 按源文档示例顺序传入;示例参数形态为 `20230110T` |
# 数据仓库金融函数 - 向导函数 / N日 / 中间函数 # 数据仓库金融函数 - 向导函数 / N日 / 中间函数
文档类型:函数事实页 文档类型:函数事实页
@ -134,6 +135,7 @@
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 | | 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
| -------- | ------------ | ---- | ---------- | ----------------------------------------------- | | -------- | ------------ | ---- | ---------- | ----------------------------------------------- |
| 1 | `expression` | 是 | 表达式对象 | 按源文档示例顺序传入;示例参数形态为 `@close()` | | 1 | `expression` | 是 | 表达式对象 | 按源文档示例顺序传入;示例参数形态为 `@close()` |
# 数据仓库金融函数 - 向导函数 / 历史遗留 # 数据仓库金融函数 - 向导函数 / 历史遗留
文档类型:函数事实页 文档类型:函数事实页

View File

@ -386,6 +386,7 @@
| 3 | `arg3` | 是 | 字符串 | 按源文档示例顺序传入 | | 3 | `arg3` | 是 | 字符串 | 按源文档示例顺序传入 |
| 4 | `lj1` | 是 | 任意值 | 按源文档示例顺序传入 | | 4 | `lj1` | 是 | 任意值 | 按源文档示例顺序传入 |
| 5 | `arg5` | 否 | 整数 | 按源文档示例顺序传入 | | 5 | `arg5` | 否 | 整数 | 按源文档示例顺序传入 |
# 资源访问函数 - 宽字节处理函数 # 资源访问函数 - 宽字节处理函数
文档类型:函数事实页 文档类型:函数事实页

View File

@ -333,6 +333,7 @@
| -------- | ----------- | ---- | -------- | ------------- | | -------- | ----------- | ---- | -------- | ------------- |
| 1 | `buffer` | 是 | 任意值 | Binary Buffer | | 1 | `buffer` | 是 | 任意值 | Binary Buffer |
| 2 | `type_name` | 是 | 字符串 | 类型名称 | | 2 | `type_name` | 是 | 字符串 | 类型名称 |
# 系统相关函数 - 复制函数 # 系统相关函数 - 复制函数
文档类型:函数事实页 文档类型:函数事实页
@ -351,6 +352,7 @@
| 参数位置 | 参数名 | 必填 | 接收类型 | 说明 | | 参数位置 | 参数名 | 必填 | 接收类型 | 说明 |
| -------- | ------- | ---- | -------- | ------ | | -------- | ------- | ---- | -------- | ------ |
| 1 | `value` | 是 | 整数 | 输入值 | | 1 | `value` | 是 | 整数 | 输入值 |
# 系统相关函数 - 条件选择函数 # 系统相关函数 - 条件选择函数
文档类型:函数事实页 文档类型:函数事实页

View File

@ -25,6 +25,7 @@
- 真值示例:`1`、`true`、`-1`、`0.5`、`"abc"`、`array(1)`;通过时返回 `0` - 真值示例:`1`、`true`、`-1`、`0.5`、`"abc"`、`array(1)`;通过时返回 `0`
- 假值示例:`0`、`false`、`nil`、`""`、`array()`;失败时直接抛出 `error_message` - 假值示例:`0`、`false`、`nil`、`""`、`array()`;失败时直接抛出 `error_message`
- 断言失败不会把错误信息作为普通返回值交给调用方继续执行。 - 断言失败不会把错误信息作为普通返回值交给调用方继续执行。
# 系统相关函数 - 性能优化相关函数 # 系统相关函数 - 性能优化相关函数
文档类型:函数事实页 文档类型:函数事实页

View File

@ -39,7 +39,7 @@
| 写单元 (unit) / uses | [09_units_and_scope.md](09_units_and_scope.md) | 查找路径、模块边界或文件名不明 | | 写单元 (unit) / uses | [09_units_and_scope.md](09_units_and_scope.md) | 查找路径、模块边界或文件名不明 |
| 写运行时环境参数、`sysParams[...]`、`with array(...)`、网格调用或全局缓存 | [10_runtime_context_and_with.md](10_runtime_context_and_with.md) | 需要项目运行时事实 | | 写运行时环境参数、`sysParams[...]`、`with array(...)`、网格调用或全局缓存 | [10_runtime_context_and_with.md](10_runtime_context_and_with.md) | 需要项目运行时事实 |
| 核对高频误写 / 反例 / 负向边界 | [11_pitfalls.md](11_pitfalls.md) | 反例没有指向正确专题 | | 核对高频误写 / 反例 / 负向边界 | [11_pitfalls.md](11_pitfalls.md) | 反例没有指向正确专题 |
| 写数组创建、键表、集合运算(+/-/* | [12_matrix_and_collections.md](12_matrix_and_collections.md) | 需要未记录的数据结构操作 | | 写数组创建、键表、集合运算(+/-/\* | [12_matrix_and_collections.md](12_matrix_and_collections.md) | 需要未记录的数据结构操作 |
| 写结果集过滤专题 | [13_resultset_and_filters.md](13_resultset_and_filters.md) | 结果集来源或字段结构不明 | | 写结果集过滤专题 | [13_resultset_and_filters.md](13_resultset_and_filters.md) | 结果集来源或字段结构不明 |
| 写 TS-SQL 专题 | [14_ts_sql.md](14_ts_sql.md) | 需要未记录的 SQL 外形 | | 写 TS-SQL 专题 | [14_ts_sql.md](14_ts_sql.md) | 需要未记录的 SQL 外形 |
| 看调试与性能分析器专题 | [15_debug_and_profiler.md](15_debug_and_profiler.md) | 需要项目执行环境 | | 看调试与性能分析器专题 | [15_debug_and_profiler.md](15_debug_and_profiler.md) | 需要项目执行环境 |
@ -56,10 +56,12 @@
## 常见歧义边界判断 ## 常见歧义边界判断
### 数组 vs 矩阵 ### 数组 vs 矩阵
- **用 12数组基础** 如果:创建数组 `array()`、键表操作、集合运算(`+`/`-`/`*`)、基础索引 - **用 12数组基础** 如果:创建数组 `array()`、键表操作、集合运算(`+`/`-`/`*`)、基础索引
- **用 22矩阵进阶** 如果:矩阵维度操作、转置、线性代数、矩阵专属语义 - **用 22矩阵进阶** 如果:矩阵维度操作、转置、线性代数、矩阵专属语义
### 类基础 vs 重载 ### 类基础 vs 重载
- **用 08类基础** 如果类定义、继承、property、静态字段、构造函数 - **用 08类基础** 如果类定义、继承、property、静态字段、构造函数
- **用 24对象重载** 如果:运算符重载(`+`/`-`/`*`/`[]`、for 迭代器重载 - **用 24对象重载** 如果:运算符重载(`+`/`-`/`*`/`[]`、for 迭代器重载

View File

@ -9,6 +9,7 @@
### 测试定义(通用) ### 测试定义(通用)
- **`test_cases.md`** - 100+ 测试用例定义(英文完整版) - **`test_cases.md`** - 100+ 测试用例定义(英文完整版)
- 适用于所有 agentClaude, GPT-4, Gemini, 等) - 适用于所有 agentClaude, GPT-4, Gemini, 等)
- 包含提示词、评分标准、预期代码 - 包含提示词、评分标准、预期代码
- 与具体 agent 无关 - 与具体 agent 无关
@ -33,7 +34,7 @@
### 当前文件 ### 当前文件
``` ```text
test/agent/ test/agent/
├── README.md # 本文件 ├── README.md # 本文件
├── test_cases.md # 通用测试定义(英文完整版)⭐ ├── test_cases.md # 通用测试定义(英文完整版)⭐
@ -46,7 +47,7 @@ test/agent/
### 添加新 Agent 的测试结果 ### 添加新 Agent 的测试结果
``` ```text
test/agent/ test/agent/
├── test_cases.md # 通用(不变) ├── test_cases.md # 通用(不变)
├── test_cases_zh.md # 中文版(不变) ├── test_cases_zh.md # 中文版(不变)
@ -63,12 +64,14 @@ test/agent/
### 测试不同的 Agent ### 测试不同的 Agent
1. **使用相同的测试定义** 1. **使用相同的测试定义**
```bash ```bash
# 所有 agent 都使用 test_cases.md 中的测试用例 # 所有 agent 都使用 test_cases.md 中的测试用例
cat test_cases.md cat test_cases.md
``` ```
2. **为每个 Agent 记录结果** 2. **为每个 Agent 记录结果**
```bash ```bash
# 创建结果目录 # 创建结果目录
mkdir -p test/agent/result mkdir -p test/agent/result
@ -84,6 +87,7 @@ test/agent/
``` ```
3. **对比不同 Agent 的表现** 3. **对比不同 Agent 的表现**
```bash ```bash
# 对比通过率、得分、常见错误等 # 对比通过率、得分、常见错误等
diff test/agent/result/results_claude_20240617.md \ diff test/agent/result/results_claude_20240617.md \
@ -108,6 +112,7 @@ DATE=$(date +%Y%m%d)
### 2. 执行测试 ### 2. 执行测试
对于每个测试用例: 对于每个测试用例:
1. 复制提示词Prompt 1. 复制提示词Prompt
2. 发送给目标 agent 2. 发送给目标 agent
3. 记录生成的代码 3. 记录生成的代码
@ -145,18 +150,19 @@ test/agent/result/results_gemini_20240617.md
### 格式 ### 格式
``` ```text
test/agent/result/results_{agent}_{YYYYMMDD}.md test/agent/result/results_{agent}_{YYYYMMDD}.md
``` ```
**说明** **说明**
- `result/`: 测试结果统一存放目录(已加入 `.gitignore` - `result/`: 测试结果统一存放目录(已加入 `.gitignore`
- `{agent}`: agent 名称(小写,如 claude, gpt4, gemini - `{agent}`: agent 名称(小写,如 claude, gpt4, gemini
- `{YYYYMMDD}`: 测试日期(如 20240617 - `{YYYYMMDD}`: 测试日期(如 20240617
### 示例 ### 示例
``` ```text
test/agent/result/results_claude_20260610.md # Claude 在 2026-06-10 的测试 test/agent/result/results_claude_20260610.md # Claude 在 2026-06-10 的测试
test/agent/result/results_claude_20240617.md # Claude 在 2024-06-17 的测试 test/agent/result/results_claude_20240617.md # Claude 在 2024-06-17 的测试
test/agent/result/results_gpt4_20240617.md # GPT-4 在 2024-06-17 的测试 test/agent/result/results_gpt4_20240617.md # GPT-4 在 2024-06-17 的测试
@ -172,14 +178,16 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
### 版本控制策略 ### 版本控制策略
**提交到 git** **提交到 git**
```
```text
✅ test/agent/test_cases.md # 测试定义(英文完整版) ✅ test/agent/test_cases.md # 测试定义(英文完整版)
✅ test/agent/test_cases_zh.md # 测试定义(中文完整版) ✅ test/agent/test_cases_zh.md # 测试定义(中文完整版)
✅ test/agent/README.md # 说明文档 ✅ test/agent/README.md # 说明文档
``` ```
**不提交**(已加入 `.gitignore` **不提交**(已加入 `.gitignore`
```
```text
❌ test/agent/result/ # 测试结果目录 ❌ test/agent/result/ # 测试结果目录
``` ```
@ -190,7 +198,7 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
`test_cases.md` 包含 100+ 测试用例,覆盖: `test_cases.md` 包含 100+ 测试用例,覆盖:
| 语法点 | 测试用例数 | | 语法点 | 测试用例数 |
|-------|----------| | ---------- | ---------- |
| 函数定义 | 15+ | | 函数定义 | 15+ |
| 类与对象 | 10+ | | 类与对象 | 10+ |
| 控制流 | 10+ | | 控制流 | 10+ |
@ -208,11 +216,13 @@ test/agent/result/results_gemini15_20240617.md # Gemini 1.5 在 2024-06-17
## 🔗 相关文档 ## 🔗 相关文档
### TSL 文档 ### TSL 文档
- TSL 语法文档:`docs/tsl/syntax/` - TSL 语法文档:`docs/tsl/syntax/`
- TSL 快速索引:`docs/tsl/syntax/00_agent_index.json` - TSL 快速索引:`docs/tsl/syntax/00_agent_index.json`
- TSL 语法入口:`docs/tsl/syntax/index.md` - TSL 语法入口:`docs/tsl/syntax/index.md`
### Agent 优化 ### Agent 优化
- Agent 快速索引:`docs/tsl/syntax/00_agent_index.json` - Agent 快速索引:`docs/tsl/syntax/00_agent_index.json`
- 为 agent 优化,减少 75% token 消耗 - 为 agent 优化,减少 75% token 消耗
- 包含精确行号和示例代码 - 包含精确行号和示例代码