Skip to content

--dialect option does not work #2

Description

@SpokeyWheeler

What happened?

sqrust check --dialect postgres myfile.sql
error: unexpected argument '--dialect' found

tip: to pass '--dialect' as a value, use '-- --dialect'

Usage: sqrust check [OPTIONS] [PATH]...

For more information, try '--help'.

SQL that triggers it

Any SQL triggers it

Expected behaviour

I would expect it to use the postgres dialect

Actual behaviour

error: unexpected argument '--dialect' found

tip: to pass '--dialect' as a value, use '-- --dialect'

Usage: sqrust check [OPTIONS] [PATH]...

For more information, try '--help'.

sqrust check file.sql

myfile.sql:2:121: [Layout/LongLines] Line is 181 characters, maximum is 120
myfile.sql:4:121: [Layout/LongLines] Line is 128 characters, maximum is 120
myfile.sql:7:121: [Layout/LongLines] Line is 176 characters, maximum is 120
myfile.sql:13:6: [ParenthesisSpacing] Space before closing parenthesis; remove the space
myfile.sql:10:9: [Layout/LeadingOperator] AND at start of line; place operators at the end of the previous line
myfile.sql:11:9: [Ambiguous/NullsOrdering] ORDER BY without NULLS FIRST/NULLS LAST is ambiguous; NULL sort order varies by database
myfile.sql:1:21: [Layout/MaxIdentifierLength] Identifier 'text_to_speech_message_change_uid' is 33 characters long; maximum is 30
myfile.sql:5:12: [Layout/MaxIdentifierLength] Identifier 'voice_text_to_speech_message_change' is 35 characters long; maximum is 30
myfile.sql:15:20: [Layout/MaxIdentifierLength] Identifier 'text_to_speech_message_change_uid' is 33 characters long; maximum is 30
myfile.sql:6:12: [Layout/ClauseOnNewLine] Clause 'JOIN' should start on its own line
myfile.sql:1:55: [Layout/SelectTargetNewLine] Multiple SELECT columns on the same line; put each column on its own line
myfile.sql:7:38: [Layout/SelectTargetNewLine] Multiple SELECT columns on the same line; put each column on its own line
myfile.sql:5:48: [Convention/ExplicitAlias] Table alias 'vttsmc' should use the AS keyword
myfile.sql:2:16: [Lint/KeywordIdentifier] 'name' is a SQL keyword used as an identifier — consider renaming or quoting it
myfile.sql:2:16: [Lint/KeywordIdentifier] 'name' is a SQL keyword used as an identifier — consider renaming or quoting it
myfile.sql:4:15: [Convention/ExplicitColumnAlias] Column alias 'original_name' omits the AS keyword — use 'expression AS alias' for clarity
myfile.sql:4:36: [Convention/ExplicitColumnAlias] Column alias 'original_greeting_type' omits the AS keyword — use 'expression AS alias' for clarity
myfile.sql:4:66: [Convention/ExplicitColumnAlias] Column alias 'original_message' omits the AS keyword — use 'expression AS alias' for clarity
myfile.sql:4:90: [Convention/ExplicitColumnAlias] Column alias 'original_language' omits the AS keyword — use 'expression AS alias' for clarity
myfile.sql:4:115: [Convention/ExplicitColumnAlias] Column alias 'original_voice' omits the AS keyword — use 'expression AS alias' for clarity
myfile.sql:6:17: [Structure/LateralJoin] LATERAL join is not supported in all databases (unsupported in SQL Server); verify dialect compatibility
myfile.sql:2:32: [Layout/SelectColumnPerLine] Multiple SELECT columns on one line; prefer placing each column expression on its own line
myfile.sql:3:29: [Layout/SelectColumnPerLine] Multiple SELECT columns on one line; prefer placing each column expression on its own line
myfile.sql:4:28: [Layout/SelectColumnPerLine] Multiple SELECT columns on one line; prefer placing each column expression on its own line

Version

sqrust --version

sqrust 0.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions