- 新增三个 demo 工程(demo-eslint / demo-sqlfluff / demo-stylelint):各含 src/ 样例代码与覆盖率映射(run-coverage.mjs、coverage_map.json、stylelint_line_map.json) - 归档各 demo 的插件实测导出报告(reports/): - demo-eslint:common.js / esm-demo.js / legacysyntax.cjs / typescript.ts 审查报告 + 覆盖率报告(292/292 条零偏差,126 种规则全覆盖) - demo-sqlfluff:11 个 SQL 样例审查报告 + 覆盖率报告(113/113 条零偏差,57 种规则全覆盖,含 JJ01 行号缺陷修复后的复测验证) - demo-stylelint:common.css / empty-source.css 审查报告 + 覆盖率报告(145/145 条零偏差,68 种规则全覆盖)
32 lines
562 B
SQL
32 lines
562 B
SQL
-- Demo: references rules (RF01, RF02, RF04, RF05, RF06)
|
|
SELECT
|
|
missing_tbl.column_a
|
|
FROM
|
|
my_table;
|
|
-- RF01: reference to object not present in FROM
|
|
|
|
SELECT
|
|
column_a
|
|
FROM
|
|
my_table AS a
|
|
JOIN
|
|
other_table AS b ON a.id = b.ref_id;
|
|
-- RF02: unqualified column with multiple referenced tables
|
|
|
|
SELECT
|
|
sum.a
|
|
FROM
|
|
my_table AS sum;
|
|
-- RF04: keyword used as identifier (alias)
|
|
|
|
SELECT
|
|
"my-column"
|
|
FROM
|
|
my_table;
|
|
-- RF05: special characters in identifier
|
|
|
|
SELECT
|
|
"SIMPLE_COL"
|
|
FROM
|
|
my_table;
|
|
-- RF06: unnecessary quoted identifier |