Skip to content

--exclude-rules L009 always included in sqllint command, even when corresponding config is empty #172

Description

@ruben-cit

Hey folks,

Noticed something that odd that seems to driving some bizarre behaviour downstream for me. It seems like the command that the linter is running always includes the --exclude-rules L009 even when entry in settings.json is empty.

settings.json

{
    "sqlfluff.config": "${workspaceFolder}/.sqlfluff",
    "sqlfluff.dialect": "bigquery",
    "sqlfluff.env.environmentVariables": [
      {
        "key": "example_key",
        "value": "example_value"
      }
    ],
    // "sqlfluff.env.customDotEnvFiles": [
    //   "${workspaceFolder}/example.env"
    // ],
    "sqlfluff.env.useDotEnvFile": true,
    // "sqlfluff.excludeRules": [],
    "sqlfluff.executablePath": "sqlfluff",
    "sqlfluff.ignoreLocalConfig": false,
    "sqlfluff.ignoreParsing": false,
    "sqlfluff.rules": [],
    "sqlfluff.suppressNotifications": false,
    "sqlfluff.workingDirectory": "",
    /* Linter */
    "sqlfluff.linter.arguments": ["-vv"],
    // "sqlfluff.linter.run": "onType",
    "sqlfluff.linter.diagnosticSeverity": "error",
    "sqlfluff.linter.diagnosticSeverityByRule": [
      {
        "rule": "L010",
        "severity": "warning"
      }
    ],
    "sqlfluff.linter.lintEntireProject": true,
    /* Formatter */
    "sqlfluff.format.arguments": ["--FIX-EVEN-UNPARSABLE"],
    "sqlfluff.format.enabled": true,

    "sqlfluff.linter.run": "onSave",
    "sqlfluff.experimental.format.executeInTerminal": true,
    "editor.formatOnSave": false,

}

Logged sqlint command that the parse is running (per the Output tab):

sqlfluff lint -vv --format json --config /workspaces/data-team/.sqlfluff --dialect bigquery --exclude-rules L009 dbt/models/infra/agg_app_versions.sql

Is this intended behaviour or is this something that we could look to fix?

Extension version: 3.3.1
sqlflluff version: 3.3.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions