Skip to content

Commit 3f55e8c

Browse files
authored
docs: add squawk-ignore-file comment docs (#588)
1 parent 83201b4 commit 3f55e8c

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,23 @@ You can also ignore multiple rules by making a comma seperated list:
179179
alter table t drop column c cascade;
180180
```
181181
182+
To ignore a rule for the entire rule, use `squawk-ignore-file`:
183+
184+
```sql
185+
-- squawk-ignore-file ban-drop-column
186+
alter table t drop column c cascade;
187+
-- also ignored!
188+
alter table t drop column d cascade;
189+
```
190+
191+
Or leave off the rule names to ignore all rules for the file
192+
193+
```sql
194+
-- squawk-ignore-file
195+
alter table t drop column c cascade;
196+
create table t (a int);
197+
```
198+
182199
### Configuration file
183200
184201
Rules can also be disabled with a configuration file.

docs/docs/cli.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ You can also ignore multiple rules by making a comma seperated list:
3737
alter table t drop column c cascade;
3838
```
3939

40+
To ignore a rule for the entire rule, use `squawk-ignore-file`:
41+
42+
```sql
43+
-- squawk-ignore-file ban-drop-column
44+
alter table t drop column c cascade;
45+
-- also ignored!
46+
alter table t drop column d cascade;
47+
```
48+
49+
Or leave off the rule names to ignore all rules for the file
50+
51+
```sql
52+
-- squawk-ignore-file
53+
alter table t drop column c cascade;
54+
create table t (a int);
55+
```
56+
4057
## Files
4158

4259
Files can be excluded from linting via the `--exclude-path` flag. Glob matching is supported and the flag can be provided multiple times.

0 commit comments

Comments
 (0)