squawk-cli 0.11.3 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +36 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -65,7 +65,7 @@ squawk
65
65
  Find problems in your SQL
66
66
 
67
67
  USAGE:
68
- squawk [FLAGS] [OPTIONS] [paths]... [SUBCOMMAND]
68
+ squawk [FLAGS] [OPTIONS] [path]... [SUBCOMMAND]
69
69
 
70
70
  FLAGS:
71
71
  -h, --help
@@ -77,24 +77,33 @@ FLAGS:
77
77
  -V, --version
78
78
  Prints version information
79
79
 
80
+ --verbose
81
+ Enable debug logging output
82
+
80
83
 
81
84
  OPTIONS:
82
- --dump-ast <dump-ast>
83
- Output AST in JSON [possible values: Raw, Parsed]
85
+ -c, --config <config-path>
86
+ Path to the squawk config file (.squawk.toml)
87
+
88
+ --dump-ast <ast-format>
89
+ Output AST in JSON [possible values: Raw, Parsed, Debug]
84
90
 
85
- -e, --exclude <exclude>...
91
+ -e, --exclude <rule>...
86
92
  Exclude specific warnings
87
93
 
88
94
  For example: --exclude=require-concurrent-index-creation,ban-drop-database
89
- --explain <explain>
95
+ --explain <rule>
90
96
  Provide documentation on the given rule
91
97
 
92
98
  --reporter <reporter>
93
99
  Style of error reporting [possible values: Tty, Gcc, Json]
94
100
 
101
+ --stdin-filepath <filepath>
102
+ Path to use in reporting for stdin
103
+
95
104
 
96
105
  ARGS:
97
- <paths>...
106
+ <path>...
98
107
  Paths to search
99
108
 
100
109
 
@@ -111,6 +120,27 @@ Individual rules can be disabled via the `--exclude` flag
111
120
  squawk --exclude=adding-field-with-default,disallowed-unique-constraint example.sql
112
121
  ```
113
122
 
123
+ ### Configuration file
124
+
125
+ Rules can also be disabled with a configuration file.
126
+
127
+ By default, Squawk will traverse up from the current directory to find a `.squawk.toml` configuration file. You may specify a custom path with the `-c` or `--config` flag.
128
+
129
+ ```shell
130
+ squawk --config=~/.squawk.toml example.sql
131
+ ```
132
+
133
+ The `--exclude` flag will always be prioritized over the configuration file.
134
+
135
+ **Example `.squawk.toml`**
136
+
137
+ ```toml
138
+ excluded_rules = [
139
+ "require-concurrent-index-creation",
140
+ "require-concurrent-index-deletion",
141
+ ]
142
+ ```
143
+
114
144
  See the [Squawk website](https://squawkhq.com/docs/rules) for documentation on each rule with examples and reasoning.
115
145
 
116
146
  ## Bot Setup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squawk-cli",
3
- "version": "0.11.3",
3
+ "version": "0.13.1",
4
4
  "description": "linter for PostgreSQL, focused on migrations",
5
5
  "repository": "git@github.com:sbdchd/squawk.git",
6
6
  "author": "Steve Dignam <steve@dignam.xyz>",