Skip to content

Commit

Permalink
Revert changes to bad.sql and update tests to work with sqlfluff 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertOstermann committed Jul 15, 2023
1 parent 05c3db7 commit fa88ba3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 2 additions & 0 deletions test/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
// SQLFluff Extended
"files.insertFinalNewline": false,
"files.trimFinalNewlines": false,
"sqlfluff.codeActions.excludeRules.global": true,
"sqlfluff.codeActions.excludeRules.workspace": false,
"sqlfluff.config": "${workspaceFolder}/.sqlfluff",
Expand Down
4 changes: 2 additions & 2 deletions test/suite/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ suite("Extension Test Suite", () => {

assert.strictEqual(actualDiagnostics.length, 2);
[
{ range: Helper.toRange(1, 10, 1, 10), message: "Keywords must be consistently upper case.", code: "L010" },
{ range: Helper.toRange(2, 1, 2, 1), message: "Files must end with a single trailing newline.", code: "L009" },
{ range: Helper.toRange(1, 11, 1, 10), message: "Keywords must be consistently upper case.", code: "CP01" },
{ range: Helper.toRange(2, 1, 2, 1), message: "Files must end with a single trailing newline.", code: "LT12" },
].forEach((expectedDiagnostic, i) => {
assertDiagnosticIsEqual(actualDiagnostics[i], expectedDiagnostic);
});
Expand Down
11 changes: 1 addition & 10 deletions test/suite/test_sql/bad.sql
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
-- Formatting does not currently work with parsing errors (even if ignored)
SET MODE LEGACY; -- noqa: PRS

-- 割引金額
SELECT c.a from b c; -- noqa: L031

SELECT c.a from b c; -- noqa: L031

SELECT c.a from b c; -- noqa: L031
SELECT c.a from c

SELECT c.a
from b c; -- noqa: L031

0 comments on commit fa88ba3

Please sign in to comment.