Skip to content

Conversation

erik
Copy link
Owner

@erik erik commented Feb 18, 2020

Taking a crack at @PhilipTrauner's idea from #6.

This adds support for a new per-file configuration option, which can turn off any syntax/semantic checking for an entire file.

Additionally, this PR updates the per-file configuration keys to use the prefix squabble-.

/* old format (deprecated, but still supported) */
-- enable:ruleA

/* new format */
-- squabble-enable:ruleA

@PhilipTrauner
Copy link
Contributor

Great stuff! Good call on also introducing the squabble- prefix for per-file settings.
What would you think about extending the configuration system even further to allow for line-based ignores?

I've got something like this in mind:

-- squabble-disable-line:RequirePrimaryKey
create table public.foo (
    bar integer not null
);

-- squabble-disable-line
create table public.baz ();

I'd also be more than happy to take a crack at this myself 🙂

@erik
Copy link
Owner Author

erik commented Feb 18, 2020

@PhilipTrauner pglast seems to be a bit inconsistent about location reporting, so my suspicion is that it would be a bit tricky to get per-line configurations working well, but I really like the idea! If you wanted to try it out I would be happy to include that functionality.

@erik erik merged commit 0465aed into master Feb 19, 2020
@erik erik deleted the disable-all branch February 19, 2020 01:31
@PhilipTrauner PhilipTrauner mentioned this pull request Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants