SQL

SQL

Made by DeepSource
Unnecessary whitespace found SQL-L039
Style
Minor

Whitespace should be limited to a single space unless while indenting or preceding a comment.

Unused table alias SQL-L025
Anti-pattern
Major

Tables should not be aliased if that alias is not used. An usused alias makes code harder to read without changing any functionality.

Undefined reference detected SQL-L026
Bug risk
Major

References cannot reference objects not present in FROM clause. It is recommended to remove the reference.

Unqualified references SQL-L027
Bug risk
Major

References should be qualified if SELECT has more than one referenced table/view. NB: Except if they’re present in a USING clause.

Inconsistent references SQL-L028
Style
Minor

References should be consistent in statements with a single table. You can configure this in the [analyzers.meta] section of the .deepsource.toml vonfiguration file.

Keyword used as an identifier SQL-L029
Bug risk
Major

Keywords should not be used as identifiers.

Unnecessary trailing whitespace SQL-L001
Style
Minor

Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline.

Mixed Tabs and Spaces in single whitespace SQL-L002
Style
Minor

A single section of whitespace contains both tabs and spaces.

Expected a single whitespace after AS SQL-L023
Style
Minor

A single whitespace is expected after AS in WITH clause.

Expected a single whitespace after USING SQL-L024
Style
Minor

A single whitespace expected after USING in JOIN clause to avoid confusing it for a function.

Files must end with a trailing newline SQL-L009
Style
Minor

Each file should end with a trailing newline. Ref: https://unix.stackexchange.com/questions/18743/whats-the-point-in-adding-a-new-line-to-the-end-of-a-file

Inconsistent capitalization detected SQL-L014
Style
Major

Inconsistent capitalization found for unquoted identifiers. All keywords should be of same case to maintain consistency.

Line too long SQL-L016
Style
Minor

Line length of the SQL statement exceeds the defined limit. This includes - Maximum line length allowed.

Inconsistent function names SQL-L030
Style
Minor

Inconsistent capitalisation of function names.

Indentation not consistent with previous lines SQL-L003
Style
Minor

Operators placed before the newline SQL-L007
Style
Minor

Operators near newlines should be placed after, not before the newline.

Duplicate table aliases SQL-L020
Anti-pattern
Critical

Table aliases should be unique within each clause. It is recommended to name the aliases differently.

Missing whitespace after a comma SQL-L008
Style
Minor

Commas should be followed by a single whitespace unless followed by a comment.

Inconsistent capitalisation of keywords SQL-L010
Style
Major

All keywords should be of same case to maintain consistency. The defaults can be configured per your needs with the following parameters.

Implicit aliasing of table detected SQL-L011
Style
Major

Implicit aliasing of table not allowed. Use explicit AS clause.