feat: 方法级代码审查 + 模板导入/预览增强 + SQLFluff 方言 + AI 空响应报错修复
- 方法级审查:CodeLens 触发 + 单次 AI 调用(规则匹配 + 6 维度深度审查),新增 method-extractor / status-cache / codeLensProvider - 模板导入:severity 保留原始值 + 占位 id、去重对照统一 known-rules、重复提示条双语翻译、箭头展开/折叠 UI、520 条静态规则补 zh/ja 翻译 - SQL:sql-lint 重命名 sqlfluff + sqlfluff.dialect 方言可配置 + 默认方言调整 - ESLint:v9 flat config 接线修复(overrideConfigFile)+ legacy 迁移提示 - AI:空响应 EmptyContentError + 重试一次 + max_tokens 截断专用报错 - JSP:整文件检查走 PMD JSP 规则集 + scriptlet 包装解析 + 行号映射 - 诊断按 severity + 行号排序
This commit is contained in:
+62
-8
@@ -48,6 +48,10 @@
|
||||
{
|
||||
"command": "codeReviewer.exportTemplate",
|
||||
"title": "Code Purifier: 导出规则模板"
|
||||
},
|
||||
{
|
||||
"command": "codeReviewer.reviewMethod",
|
||||
"title": "Code Purifier: 审查此方法"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
@@ -84,6 +88,10 @@
|
||||
{
|
||||
"command": "codeReviewer.reviewSelection",
|
||||
"when": "editorHasSelection"
|
||||
},
|
||||
{
|
||||
"command": "codeReviewer.reviewMethod",
|
||||
"when": "editorTextFocus"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -186,19 +194,19 @@
|
||||
},
|
||||
"vscode-code-reviewer.linters.sql": {
|
||||
"type": "string",
|
||||
"default": "sql-lint",
|
||||
"default": "sqlfluff",
|
||||
"enum": [
|
||||
"",
|
||||
"sql-lint"
|
||||
"sqlfluff"
|
||||
],
|
||||
"description": "SQL linter"
|
||||
},
|
||||
"vscode-code-reviewer.linters.plsql": {
|
||||
"type": "string",
|
||||
"default": "sql-lint",
|
||||
"default": "sqlfluff",
|
||||
"enum": [
|
||||
"",
|
||||
"sql-lint"
|
||||
"sqlfluff"
|
||||
],
|
||||
"description": "PL/SQL linter"
|
||||
},
|
||||
@@ -217,15 +225,51 @@
|
||||
"default": "",
|
||||
"description": "JSP 规则集 XML 路径(空=使用内置)"
|
||||
},
|
||||
"vscode-code-reviewer.sql-lint.configFile": {
|
||||
"vscode-code-reviewer.sqlfluff.configFile": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "sqlfluff 配置文件路径"
|
||||
},
|
||||
"vscode-code-reviewer.sqlfluff.dialect": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"enum": [
|
||||
"",
|
||||
"ansi",
|
||||
"athena",
|
||||
"bigquery",
|
||||
"clickhouse",
|
||||
"databricks",
|
||||
"db2",
|
||||
"doris",
|
||||
"duckdb",
|
||||
"exasol",
|
||||
"flink",
|
||||
"greenplum",
|
||||
"hive",
|
||||
"impala",
|
||||
"mariadb",
|
||||
"materialize",
|
||||
"mysql",
|
||||
"oracle",
|
||||
"postgres",
|
||||
"redshift",
|
||||
"snowflake",
|
||||
"soql",
|
||||
"sparksql",
|
||||
"sqlite",
|
||||
"starrocks",
|
||||
"teradata",
|
||||
"trino",
|
||||
"tsql",
|
||||
"vertica"
|
||||
],
|
||||
"description": "SQLFluff 方言(空=自动:全局/项目配置 > 语言映射)"
|
||||
},
|
||||
"vscode-code-reviewer.linters.eslintConfigPath": {
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "ESLint 自定义配置文件路径(绝对路径)。留空则使用项目 .eslintrc 或内置规则"
|
||||
"description": "ESLint 自定义配置文件路径(绝对路径)。留空则使用项目 eslint.config.* 或内置规则"
|
||||
},
|
||||
"vscode-code-reviewer.linters.stylelintConfigPath": {
|
||||
"type": "string",
|
||||
@@ -237,10 +281,10 @@
|
||||
"default": true,
|
||||
"description": "启用/禁用 PMD 适配器"
|
||||
},
|
||||
"vscode-code-reviewer.linter.sql-lint.enabled": {
|
||||
"vscode-code-reviewer.linter.sqlfluff.enabled": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "启用/禁用 SQL-Lint 适配器"
|
||||
"description": "启用/禁用 SQLFluff 适配器"
|
||||
},
|
||||
"vscode-code-reviewer.linter.eslint.enabled": {
|
||||
"type": "boolean",
|
||||
@@ -256,6 +300,16 @@
|
||||
"type": "number",
|
||||
"default": 5,
|
||||
"description": "AI 修复时提取的上下文行数"
|
||||
},
|
||||
"vscode-code-reviewer.codelens.enabled": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "在函数声明上方显示方法级审查按钮"
|
||||
},
|
||||
"vscode-code-reviewer.codelens.languages": {
|
||||
"type": "array",
|
||||
"default": ["typescript", "javascript", "java", "python"],
|
||||
"description": "启用方法级 CodeLens 的语言列表"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user