From b2916666f516439ade49c0b0c683b972d8cac6d9 Mon Sep 17 00:00:00 2001 From: Steve Dignam Date: Fri, 11 Jul 2025 20:56:20 -0400 Subject: [PATCH] docs: add squawk-ignore-file comment docs --- README.md | 17 +++++++++++++++++ docs/docs/cli.md | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/README.md b/README.md index 3830a626..31dffa74 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,23 @@ You can also ignore multiple rules by making a comma seperated list: alter table t drop column c cascade; ``` +To ignore a rule for the entire rule, use `squawk-ignore-file`: + +```sql +-- squawk-ignore-file ban-drop-column +alter table t drop column c cascade; +-- also ignored! +alter table t drop column d cascade; +``` + +Or leave off the rule names to ignore all rules for the file + +```sql +-- squawk-ignore-file +alter table t drop column c cascade; +create table t (a int); +``` + ### Configuration file Rules can also be disabled with a configuration file. diff --git a/docs/docs/cli.md b/docs/docs/cli.md index 66e48672..4cc45415 100644 --- a/docs/docs/cli.md +++ b/docs/docs/cli.md @@ -37,6 +37,23 @@ You can also ignore multiple rules by making a comma seperated list: alter table t drop column c cascade; ``` +To ignore a rule for the entire rule, use `squawk-ignore-file`: + +```sql +-- squawk-ignore-file ban-drop-column +alter table t drop column c cascade; +-- also ignored! +alter table t drop column d cascade; +``` + +Or leave off the rule names to ignore all rules for the file + +```sql +-- squawk-ignore-file +alter table t drop column c cascade; +create table t (a int); +``` + ## Files Files can be excluded from linting via the `--exclude-path` flag. Glob matching is supported and the flag can be provided multiple times.