fix(dacli): form-lint dead import + unused interface (Batch A review fix)
This commit is contained in:
1 parent
1914a42490
commit
d22ac5f0e4
2 files changed
+7
-9
No files matched your search
@@ -14,11 +14,6 @@ export interface BlindspotIssue {
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface BlindspotResult {
|
||||
issues: BlindspotIssue[]
|
||||
blindspotIds: string[] // e.g. ['BS-23', 'BS-31', ...] — 5 必查 ID 列表
|
||||
}
|
||||
|
||||
export const BLINDSPOT_IDS = ['BS-23', 'BS-31', 'BS-32', 'BS-15', 'BS-V2'] as const
|
||||
|
||||
function safeParse(s: unknown): unknown {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Command } from 'commander'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { resolve } from 'node:path'
|
||||
import { installAiHelpHook } from '../../core/help.ts'
|
||||
import { checkBs31, checkBs32, checkBs23, type BlindspotIssue } from './_blindspots.ts'
|
||||
import { checkBs31, checkBs32, type BlindspotIssue } from './_blindspots.ts'
|
||||
import { parsePythonForms, parseDesignHtml, type FormDef, type CmdBlock } from './_parsers.ts'
|
||||
import { printJson, log } from '../../core/log.ts'
|
||||
|
||||
@@ -44,6 +44,8 @@ function lintScript(scriptPath: string): { forms: FormDef[]; issues: BlindspotIs
|
||||
issues.push(...checkBs31(JSON.stringify(formData)))
|
||||
issues.push(...checkBs32(JSON.stringify(formData)))
|
||||
}
|
||||
// BS-23/15/V2 设计期跳过: 需 JNPF server 拉 form 详情 (columnData/tables/formData JSON),
|
||||
// 设计稿/Python 脚本无运行时 form data, 由 form validate 运行时兜底
|
||||
return { forms, issues }
|
||||
}
|
||||
|
||||
@@ -145,9 +147,10 @@ export function buildFormLintCommand(): Command {
|
||||
'dacli form lint --from-script=... --from-design=...',
|
||||
],
|
||||
notes: [
|
||||
'BS-23 检查 design 整体是否含 4 个 use*Permission (粗略扫描)',
|
||||
'BS-31/32 检查每个 form 字段 label / decimal 类型',
|
||||
'BS-15/V2 在设计期无法直接判断, 标 N/A (运行时由 form validate 兜底)',
|
||||
'BS-23 N/A 设计期: 需运行时 columnData, 由 form validate 兜底',
|
||||
'BS-31/32 per-field 检查: 扫每个 form 字段 label / decimal 类型',
|
||||
'BS-15 N/A 设计期: 需运行时 tables (enableFlow=1 + f_flow_task_id)',
|
||||
'BS-V2 N/A 设计期: 需运行时 form detail (formData/columnData/dbLinkId)',
|
||||
],
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user