Code Analysis
.deepsource.toml
This section covers.deepsource.toml
configuration specific to the sql
analyzer. Please make sure to read the general configuration guide first.
name
- Type: String
- Presence: mandatory
- Description: Shortcode of the analyzer.
- Example:
enabled
- Type: Boolean
- Presence: optional
- Description: Toggle whether this analyzer should be run.
- Example:
meta
- Type: Table
- Presence: optional
- Description: Any supported metadata to pass to the analyzer.
- Example:
max_line_length
- Type: Integer
- Presence: optional
- Description: The maximum length of a line to allow without raising a violation
- Available Value: Any positive integer value.
- Default Value: 80
- Example:
tab_space_size
- Type: Integer
- Presence: optional
- Description: The number of spaces to consider equal to one tab.
- Available Value: Any positive integer value.
- Default Value: 4
- Example:
indent_unit
- Type: String
- Presence: optional
- Description: Whether to use tabs or spaces to add new indents.
- Available Values:
tab
andspace
- Default Value: “space”
- Example:
comma_style
- Type: String
- Presence: optional
- Description: The comma style to enforce.
- Available Values:
trailing
andleading
- Default Value: “trailing”
- Example:
capitalisation_policy
- Type: String
- Presence: optional
- Description: The capitalization policy to enforce.
- Available Value:
consistent
,upper
,lower
andcapitalise
. - Default Value: “consistent”
- Example:
allow_scalar
- Type: Boolean
- Presence: optional
- Description: If
true
then there would be no issues if there is only one element in theSELECT
clause e.g.SELECT 1 + 2 FROM blah
. It will still fail if there are multiple columns. - Available Values:
true
andfalse
- Default Value: true
- Example:
single_table_references
- Type: String
- Presence: optional
- Description: The expectation for references in single-table
SELECT
. - Available Values:
qualified
,unqualified
andconsistent
- Default Value: “consistent”
- Example: