From c4b56fc2d3f2c0e7d324c2b5530521dc603ccaf7 Mon Sep 17 00:00:00 2001 From: Joe Reynolds Date: Tue, 23 Jun 2020 14:46:00 +0100 Subject: [PATCH] Update checks.md --- docs/files/checks.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/files/checks.md b/docs/files/checks.md index 8d47c591..cd402767 100644 --- a/docs/files/checks.md +++ b/docs/files/checks.md @@ -23,28 +23,50 @@ Shown when a `DELETE` statement is missing a `WHERE` clause. #### Example output +``` +test/test-files/test.sql:20 [sql-lint: missing-where] DELETE statement missing WHERE clause. +``` + ### invalid-drop-option Shown when an invalid option is given to the `DROP` statement. #### Example output +``` +test/test-files/test.sql:22 [sql-lint: invalid-drop-option] Option 'thing' is not a valid option, must be one of '["database","event","function","index","logfile","procedure","schema","server","table","view","tablespace","trigger"]'. +``` + ### invalid-create-option + Shown when an invalid option is given to the `CREATE` statement. #### Example output +``` +:24 [sql-lint: invalid-create-option] Option 'test' is not a valid option, must be one of '["algorithm","database","definer","event","function","index","or","procedure","server","table","tablespace","temporary","trigger","user","unique","view"]'. +``` + ### invalid-truncate-option + Shown when an invalid option is given to the `TRUNCATE` statement. #### Example output +``` +test/test-files/test.sql:26 [sql-lint: invalid-truncate-option] Option 'something' is not a valid option, must be one of '["table"]'. +``` + ### invalid-alter-option Shown when an invalid option is given to the `ALTER` statement. #### Example output +``` +test/test-files/test.sql:28 [sql-lint: invalid-alter-option] Option 'mlady' is not a valid option, must be one of '["column","online","offline","ignore","database","event","function","procedure","server","table","tablespace","view"]'. +``` + ### odd-code-point Shown when there are unsupported/unusual* code points in your code. @@ -60,7 +82,6 @@ realising. test/test-files//test.sql:30 [sql-lint: odd-code-point] Unexpected code point. ``` - ### invalid-limit-quantifier Shown when you specify something other than a number to the `LIMIT` statement. @@ -78,6 +99,5 @@ Shown when the string `sp_` or `tbl_` is present in the query. #### Example output ``` -test/test-files//test.sql:32 [sql-lint: hungarian-notation] Query uses hungarian -notation. +test/test-files/test.sql:34 [sql-lint: hungarian-notation] Hungarian notation present in query ```