Commit 8b161d1
authored
feat: add no-error-on-unmatched-pattern option (#639)
Currently, `squawk` exits with failure when the provided path pattern does not match any file.
This behavior can be unexpected, specifically when `squawk` is given the instruction to ignore files (via `excluded_paths `) and thus does not find any file to work on.
See issues #387 and #363 for more details.
This PR adds the option `--no-error-on-unmatched-pattern`, which causes the exit code to be `0` in cases mentioned above. `squawk` will still print the message stating that no files were found with the given pattern, which should help debugging cases where this may be unexpected.1 parent a58a323 commit 8b161d1
2 files changed
+44
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
213 | 216 | | |
214 | 217 | | |
215 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
219 | 228 | | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
| |||
251 | 261 | | |
252 | 262 | | |
253 | 263 | | |
254 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
255 | 267 | | |
256 | 268 | | |
257 | 269 | | |
| |||
275 | 287 | | |
276 | 288 | | |
277 | 289 | | |
278 | | - | |
| 290 | + | |
279 | 291 | | |
280 | 292 | | |
281 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
141 | 144 | | |
142 | 145 | | |
143 | | - | |
| 146 | + | |
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
148 | | - | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
155 | 166 | | |
156 | | - | |
| 167 | + | |
157 | 168 | | |
158 | | - | |
159 | | - | |
| 169 | + | |
160 | 170 | | |
161 | | - | |
| 171 | + | |
162 | 172 | | |
163 | | - | |
164 | | - | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | | - | |
| 176 | + | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
171 | | - | |
172 | | - | |
| 181 | + | |
| 182 | + | |
173 | 183 | | |
174 | 184 | | |
175 | 185 | | |
176 | 186 | | |
| 187 | + | |
177 | 188 | | |
178 | 189 | | |
0 commit comments