diff --git a/rules/whitespace.pcs b/rules/whitespace.pcs index 2aa778e..9124c1b 100644 --- a/rules/whitespace.pcs +++ b/rules/whitespace.pcs @@ -10,3 +10,7 @@ token "whitespace-after-operator" { followed-by: WHITESPACE, CLOSE_PAREN; }; +token "whitespace-after-comma" { + type: COMMA; + followed-by: WHITESPACE; +}; \ No newline at end of file diff --git a/test.sql b/test.sql index 2b1a24b..b250d93 100644 --- a/test.sql +++ b/test.sql @@ -1,3 +1,3 @@ -select COUNT(*), x*y, SUM(CASE WHEN Foo IS NOT NULL THEN 1 ELSE 0 END) +select COUNT(*), x*y,SUM(CASE WHEN Foo IS NOT NULL THEN 1 ELSE 0 END) FROM Bar WHERE Quax = $1 and Datestamp>=now() -'1 hour'::interval; \ No newline at end of file