detached-semicolon
What it does
Section titled “What it does”Reports a ; written after a space, a line break or another ;, instead of right after its statement.
Why it matters
Section titled “Why it matters”The end of a statement is easy to see when the ; sits against the last token. On its own line it reads as a separate, empty statement, and a stray ;; is an empty one.
To fix, write the ; right after the statement.
Example
Section titled “Example”...select 1 ;select 2;select 3 /* c */;/* d */;Configuration
Section titled “Configuration”sql: lint: rules: detached-semicolon: warn # off (default), warn, errorEnabled by the presets: sql/sqlfluff.
Suppress one line with sudsy-disable-next-line detached-semicolon in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| sqlfluff | CV06 |
full |