Skip to content

Disable validation for certain lines #93

@diraneyya

Description

@diraneyya

Describe the bug

I am using this snippet for the configuration:

{
  "plpgsqlLanguageServer.keywordQueryParameterPattern": [
    "@{keyword}",
    "sqlc\\.arg\\s*\\('{keyword}'\\)",
    "sqlc\\.narg\\s*\\('{keyword}'\\)",
  ],
  "plpgsqlLanguageServer.statements.separatorPattern": "-- name:[\\s]+.*",
}

The configuration key "plpgsqlLanguageServer.statements.separatorPattern" does not seem to be recognised for some reason:

Image

However, and more importantly, I am unable to use it to avoid the validation of just two lines in my extension code:

-- plpgsql-language-server:use-keyword-query-parameter
-- pg_fetch_cycle extension v1.0
-- PostgreSQL extension for managing fetch cycles with pg_net
select 'pg_fetch_cycle extension loaded' as status;

-- These lines must not be validated

-- name: DoNotValidate :many
-- plpgsql-language-server:disable
alter system set pg_net.ttl to 'never';
alter system set pg_net.batch_size to 200;
select pg_reload_conf();

-- The rest of the file must be validated

-- name: Validate :many
do $drop$
begin
...

A screenshot:

Image

Expected Behavior

For there to be no validation errors when the lines are ignored by the validator:

Image

Current Behavior

Image

Steps to Reproduce

NA

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions