colint 0.1.0__tar.gz

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.
@@ -0,0 +1,10 @@
1
+ # Warnings remain successful unless this is true.
2
+ warnings_as_errors = false
3
+
4
+ # Currently supported: "mkdocs". In MkDocs docstrings, parameters are written
5
+ # as `parameter`, not *parameter*.
6
+ docstring_convention = "mkdocs"
7
+
8
+ # Set any rule to false to disable it. --strict overrides these choices.
9
+ [rules]
10
+ # COL-003 = false
@@ -0,0 +1,21 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ quality:
12
+ name: Format, lint, and test
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: dtolnay/rust-toolchain@stable
17
+ with:
18
+ components: rustfmt, clippy
19
+ - run: cargo fmt --check
20
+ - run: cargo clippy --all-targets -- -D warnings
21
+ - run: cargo test --all-targets
@@ -0,0 +1,65 @@
1
+ name: Release and publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ permissions:
8
+ contents: write
9
+ id-token: write
10
+
11
+ jobs:
12
+ build:
13
+ name: Build ${{ matrix.os }} artifact
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ include:
19
+ - os: ubuntu-latest
20
+ args: --release --out dist --compatibility pypi --sdist
21
+ - os: macos-latest
22
+ args: --release --out dist --compatibility pypi
23
+ - os: windows-latest
24
+ args: --release --out dist --compatibility pypi
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - uses: dtolnay/rust-toolchain@stable
28
+ - uses: PyO3/maturin-action@v1
29
+ with:
30
+ command: build
31
+ args: ${{ matrix.args }}
32
+ - uses: actions/upload-artifact@v4
33
+ with:
34
+ name: wheels-${{ matrix.os }}
35
+ path: dist
36
+
37
+ release:
38
+ name: Create GitHub release
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/download-artifact@v4
43
+ with:
44
+ pattern: wheels-*
45
+ path: dist
46
+ merge-multiple: true
47
+ - uses: softprops/action-gh-release@v2
48
+ with:
49
+ generate_release_notes: true
50
+ files: dist/*
51
+
52
+ publish:
53
+ name: Publish colint to PyPI
54
+ needs: release
55
+ runs-on: ubuntu-latest
56
+ environment: pypi
57
+ permissions:
58
+ id-token: write
59
+ steps:
60
+ - uses: actions/download-artifact@v4
61
+ with:
62
+ pattern: wheels-*
63
+ path: dist
64
+ merge-multiple: true
65
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,5 @@
1
+ /target/
2
+ .venv/
3
+ dist/
4
+ .maturin/
5
+ .colint.toml
@@ -0,0 +1,457 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 3
4
+
5
+ [[package]]
6
+ name = "aho-corasick"
7
+ version = "1.1.5"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
10
+ dependencies = [
11
+ "memchr",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "anstream"
16
+ version = "1.0.0"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
19
+ dependencies = [
20
+ "anstyle",
21
+ "anstyle-parse",
22
+ "anstyle-query",
23
+ "anstyle-wincon",
24
+ "colorchoice",
25
+ "is_terminal_polyfill",
26
+ "utf8parse",
27
+ ]
28
+
29
+ [[package]]
30
+ name = "anstyle"
31
+ version = "1.0.14"
32
+ source = "registry+https://github.com/rust-lang/crates.io-index"
33
+ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
34
+
35
+ [[package]]
36
+ name = "anstyle-parse"
37
+ version = "1.0.0"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
40
+ dependencies = [
41
+ "utf8parse",
42
+ ]
43
+
44
+ [[package]]
45
+ name = "anstyle-query"
46
+ version = "1.1.5"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
49
+ dependencies = [
50
+ "windows-sys",
51
+ ]
52
+
53
+ [[package]]
54
+ name = "anstyle-wincon"
55
+ version = "3.0.11"
56
+ source = "registry+https://github.com/rust-lang/crates.io-index"
57
+ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
58
+ dependencies = [
59
+ "anstyle",
60
+ "once_cell_polyfill",
61
+ "windows-sys",
62
+ ]
63
+
64
+ [[package]]
65
+ name = "cc"
66
+ version = "1.4.7"
67
+ source = "registry+https://github.com/rust-lang/crates.io-index"
68
+ checksum = "54413ede23c2daf518f35156dfde027feb2374004d63bd497f983c8db9c0e313"
69
+ dependencies = [
70
+ "find-msvc-tools",
71
+ "shlex",
72
+ ]
73
+
74
+ [[package]]
75
+ name = "clap"
76
+ version = "4.6.7"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
79
+ dependencies = [
80
+ "clap_builder",
81
+ "clap_derive",
82
+ ]
83
+
84
+ [[package]]
85
+ name = "clap_builder"
86
+ version = "4.6.7"
87
+ source = "registry+https://github.com/rust-lang/crates.io-index"
88
+ checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
89
+ dependencies = [
90
+ "anstream",
91
+ "anstyle",
92
+ "clap_lex",
93
+ "strsim",
94
+ ]
95
+
96
+ [[package]]
97
+ name = "clap_derive"
98
+ version = "4.6.7"
99
+ source = "registry+https://github.com/rust-lang/crates.io-index"
100
+ checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0"
101
+ dependencies = [
102
+ "heck",
103
+ "proc-macro2",
104
+ "quote",
105
+ "syn",
106
+ ]
107
+
108
+ [[package]]
109
+ name = "clap_lex"
110
+ version = "1.1.1"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
113
+
114
+ [[package]]
115
+ name = "colint"
116
+ version = "0.1.0"
117
+ dependencies = [
118
+ "clap",
119
+ "serde",
120
+ "serde_json",
121
+ "toml",
122
+ "tree-sitter",
123
+ "tree-sitter-python",
124
+ "walkdir",
125
+ ]
126
+
127
+ [[package]]
128
+ name = "colorchoice"
129
+ version = "1.0.5"
130
+ source = "registry+https://github.com/rust-lang/crates.io-index"
131
+ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
132
+
133
+ [[package]]
134
+ name = "equivalent"
135
+ version = "1.0.2"
136
+ source = "registry+https://github.com/rust-lang/crates.io-index"
137
+ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
138
+
139
+ [[package]]
140
+ name = "find-msvc-tools"
141
+ version = "0.1.13"
142
+ source = "registry+https://github.com/rust-lang/crates.io-index"
143
+ checksum = "ef25905e51abafe4dcea6c15fec58c57b601cdbd0ee53d22ea1d3016c587d39b"
144
+
145
+ [[package]]
146
+ name = "hashbrown"
147
+ version = "0.17.1"
148
+ source = "registry+https://github.com/rust-lang/crates.io-index"
149
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
150
+
151
+ [[package]]
152
+ name = "heck"
153
+ version = "0.5.0"
154
+ source = "registry+https://github.com/rust-lang/crates.io-index"
155
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
156
+
157
+ [[package]]
158
+ name = "indexmap"
159
+ version = "2.14.2"
160
+ source = "registry+https://github.com/rust-lang/crates.io-index"
161
+ checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
162
+ dependencies = [
163
+ "equivalent",
164
+ "hashbrown",
165
+ ]
166
+
167
+ [[package]]
168
+ name = "is_terminal_polyfill"
169
+ version = "1.70.2"
170
+ source = "registry+https://github.com/rust-lang/crates.io-index"
171
+ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
172
+
173
+ [[package]]
174
+ name = "itoa"
175
+ version = "1.0.18"
176
+ source = "registry+https://github.com/rust-lang/crates.io-index"
177
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
178
+
179
+ [[package]]
180
+ name = "memchr"
181
+ version = "2.8.3"
182
+ source = "registry+https://github.com/rust-lang/crates.io-index"
183
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
184
+
185
+ [[package]]
186
+ name = "once_cell_polyfill"
187
+ version = "1.70.2"
188
+ source = "registry+https://github.com/rust-lang/crates.io-index"
189
+ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
190
+
191
+ [[package]]
192
+ name = "proc-macro2"
193
+ version = "1.0.107"
194
+ source = "registry+https://github.com/rust-lang/crates.io-index"
195
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
196
+ dependencies = [
197
+ "unicode-ident",
198
+ ]
199
+
200
+ [[package]]
201
+ name = "quote"
202
+ version = "1.0.47"
203
+ source = "registry+https://github.com/rust-lang/crates.io-index"
204
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
205
+ dependencies = [
206
+ "proc-macro2",
207
+ ]
208
+
209
+ [[package]]
210
+ name = "regex"
211
+ version = "1.13.1"
212
+ source = "registry+https://github.com/rust-lang/crates.io-index"
213
+ checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
214
+ dependencies = [
215
+ "aho-corasick",
216
+ "memchr",
217
+ "regex-automata",
218
+ "regex-syntax",
219
+ ]
220
+
221
+ [[package]]
222
+ name = "regex-automata"
223
+ version = "0.4.18"
224
+ source = "registry+https://github.com/rust-lang/crates.io-index"
225
+ checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
226
+ dependencies = [
227
+ "aho-corasick",
228
+ "memchr",
229
+ "regex-syntax",
230
+ ]
231
+
232
+ [[package]]
233
+ name = "regex-syntax"
234
+ version = "0.8.11"
235
+ source = "registry+https://github.com/rust-lang/crates.io-index"
236
+ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
237
+
238
+ [[package]]
239
+ name = "same-file"
240
+ version = "1.0.6"
241
+ source = "registry+https://github.com/rust-lang/crates.io-index"
242
+ checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
243
+ dependencies = [
244
+ "winapi-util",
245
+ ]
246
+
247
+ [[package]]
248
+ name = "serde"
249
+ version = "1.0.229"
250
+ source = "registry+https://github.com/rust-lang/crates.io-index"
251
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
252
+ dependencies = [
253
+ "serde_core",
254
+ "serde_derive",
255
+ ]
256
+
257
+ [[package]]
258
+ name = "serde_core"
259
+ version = "1.0.229"
260
+ source = "registry+https://github.com/rust-lang/crates.io-index"
261
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
262
+ dependencies = [
263
+ "serde_derive",
264
+ ]
265
+
266
+ [[package]]
267
+ name = "serde_derive"
268
+ version = "1.0.229"
269
+ source = "registry+https://github.com/rust-lang/crates.io-index"
270
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
271
+ dependencies = [
272
+ "proc-macro2",
273
+ "quote",
274
+ "syn",
275
+ ]
276
+
277
+ [[package]]
278
+ name = "serde_json"
279
+ version = "1.0.151"
280
+ source = "registry+https://github.com/rust-lang/crates.io-index"
281
+ checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
282
+ dependencies = [
283
+ "itoa",
284
+ "memchr",
285
+ "serde",
286
+ "serde_core",
287
+ "zmij",
288
+ ]
289
+
290
+ [[package]]
291
+ name = "serde_spanned"
292
+ version = "0.6.9"
293
+ source = "registry+https://github.com/rust-lang/crates.io-index"
294
+ checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
295
+ dependencies = [
296
+ "serde",
297
+ ]
298
+
299
+ [[package]]
300
+ name = "shlex"
301
+ version = "2.0.1"
302
+ source = "registry+https://github.com/rust-lang/crates.io-index"
303
+ checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
304
+
305
+ [[package]]
306
+ name = "streaming-iterator"
307
+ version = "0.1.9"
308
+ source = "registry+https://github.com/rust-lang/crates.io-index"
309
+ checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520"
310
+
311
+ [[package]]
312
+ name = "strsim"
313
+ version = "0.11.1"
314
+ source = "registry+https://github.com/rust-lang/crates.io-index"
315
+ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
316
+
317
+ [[package]]
318
+ name = "syn"
319
+ version = "3.0.6"
320
+ source = "registry+https://github.com/rust-lang/crates.io-index"
321
+ checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
322
+ dependencies = [
323
+ "proc-macro2",
324
+ "quote",
325
+ "unicode-ident",
326
+ ]
327
+
328
+ [[package]]
329
+ name = "toml"
330
+ version = "0.8.23"
331
+ source = "registry+https://github.com/rust-lang/crates.io-index"
332
+ checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
333
+ dependencies = [
334
+ "serde",
335
+ "serde_spanned",
336
+ "toml_datetime",
337
+ "toml_edit",
338
+ ]
339
+
340
+ [[package]]
341
+ name = "toml_datetime"
342
+ version = "0.6.11"
343
+ source = "registry+https://github.com/rust-lang/crates.io-index"
344
+ checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
345
+ dependencies = [
346
+ "serde",
347
+ ]
348
+
349
+ [[package]]
350
+ name = "toml_edit"
351
+ version = "0.22.27"
352
+ source = "registry+https://github.com/rust-lang/crates.io-index"
353
+ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
354
+ dependencies = [
355
+ "indexmap",
356
+ "serde",
357
+ "serde_spanned",
358
+ "toml_datetime",
359
+ "toml_write",
360
+ "winnow",
361
+ ]
362
+
363
+ [[package]]
364
+ name = "toml_write"
365
+ version = "0.1.2"
366
+ source = "registry+https://github.com/rust-lang/crates.io-index"
367
+ checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
368
+
369
+ [[package]]
370
+ name = "tree-sitter"
371
+ version = "0.24.7"
372
+ source = "registry+https://github.com/rust-lang/crates.io-index"
373
+ checksum = "a5387dffa7ffc7d2dae12b50c6f7aab8ff79d6210147c6613561fc3d474c6f75"
374
+ dependencies = [
375
+ "cc",
376
+ "regex",
377
+ "regex-syntax",
378
+ "streaming-iterator",
379
+ "tree-sitter-language",
380
+ ]
381
+
382
+ [[package]]
383
+ name = "tree-sitter-language"
384
+ version = "0.1.8"
385
+ source = "registry+https://github.com/rust-lang/crates.io-index"
386
+ checksum = "ca0d1bf6fdd806e43ae5198f82f527056d359def39e54e67a0f478ac09dac081"
387
+
388
+ [[package]]
389
+ name = "tree-sitter-python"
390
+ version = "0.23.6"
391
+ source = "registry+https://github.com/rust-lang/crates.io-index"
392
+ checksum = "3d065aaa27f3aaceaf60c1f0e0ac09e1cb9eb8ed28e7bcdaa52129cffc7f4b04"
393
+ dependencies = [
394
+ "cc",
395
+ "tree-sitter-language",
396
+ ]
397
+
398
+ [[package]]
399
+ name = "unicode-ident"
400
+ version = "1.0.26"
401
+ source = "registry+https://github.com/rust-lang/crates.io-index"
402
+ checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
403
+
404
+ [[package]]
405
+ name = "utf8parse"
406
+ version = "0.2.2"
407
+ source = "registry+https://github.com/rust-lang/crates.io-index"
408
+ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
409
+
410
+ [[package]]
411
+ name = "walkdir"
412
+ version = "2.5.0"
413
+ source = "registry+https://github.com/rust-lang/crates.io-index"
414
+ checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
415
+ dependencies = [
416
+ "same-file",
417
+ "winapi-util",
418
+ ]
419
+
420
+ [[package]]
421
+ name = "winapi-util"
422
+ version = "0.1.11"
423
+ source = "registry+https://github.com/rust-lang/crates.io-index"
424
+ checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
425
+ dependencies = [
426
+ "windows-sys",
427
+ ]
428
+
429
+ [[package]]
430
+ name = "windows-link"
431
+ version = "0.2.1"
432
+ source = "registry+https://github.com/rust-lang/crates.io-index"
433
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
434
+
435
+ [[package]]
436
+ name = "windows-sys"
437
+ version = "0.61.2"
438
+ source = "registry+https://github.com/rust-lang/crates.io-index"
439
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
440
+ dependencies = [
441
+ "windows-link",
442
+ ]
443
+
444
+ [[package]]
445
+ name = "winnow"
446
+ version = "0.7.15"
447
+ source = "registry+https://github.com/rust-lang/crates.io-index"
448
+ checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"
449
+ dependencies = [
450
+ "memchr",
451
+ ]
452
+
453
+ [[package]]
454
+ name = "zmij"
455
+ version = "1.0.23"
456
+ source = "registry+https://github.com/rust-lang/crates.io-index"
457
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
@@ -0,0 +1,21 @@
1
+ [package]
2
+ name = "colint"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ rust-version = "1.80"
6
+ license = "MIT"
7
+ description = "Opinionated static analysis for Python"
8
+ homepage = "https://pypi.org/project/colint/"
9
+ authors = ["Colin Kennedy <colinvfx@gmail.com>"]
10
+ keywords = ["lint", "linter", "python", "static-analysis"]
11
+ categories = ["command-line-utilities", "development-tools"]
12
+ readme = "README.md"
13
+
14
+ [dependencies]
15
+ clap = { version = "4.5", features = ["derive"] }
16
+ serde = { version = "1", features = ["derive"] }
17
+ serde_json = "1"
18
+ toml = "0.8"
19
+ walkdir = "2.5"
20
+ tree-sitter = "0.24"
21
+ tree-sitter-python = "0.23"
colint-0.1.0/DESIGN.md ADDED
@@ -0,0 +1,52 @@
1
+ # colint design decisions
2
+
3
+ This file records the initial product decisions agreed on 2026-09-23.
4
+
5
+ ## Rule identity and default severity
6
+
7
+ Every diagnostic has a stable `COL-NNN` code and a descriptive rule name. The code is the configuration and suppression identifier.
8
+
9
+ | Code | Rule | Default severity |
10
+ | --- | --- | --- |
11
+ | COL-001 | predicate-in-function | warning |
12
+ | COL-002 | loft-from-caller | warning |
13
+ | COL-003 | nested-import | error |
14
+ | COL-004 | docstring-convention | warning |
15
+ | COL-005 | redundant-type-hint | error |
16
+ | COL-006 | pytest-expected-left | warning |
17
+ | COL-007 | logging-dynamic-quote | warning |
18
+ | COL-008 | module-order | warning |
19
+ | COL-009 | empty-string-return | error |
20
+ | COL-010 | assert-in-production | error |
21
+ | COL-011 | none-polymorphism | warning |
22
+ | COL-012 | direct-raises-only | error |
23
+ | COL-013 | widget-tooltip | warning |
24
+ | COL-014 | qt-model-parent | error |
25
+
26
+ `COL-009` recommends `None` for a not-found result and requires a return annotation that includes `None`, including unions with other result types. `COL-005` only compares direct calls to functions defined in the same parsed module; imported symbols are deliberately out of scope. `COL-006` applies only to ordinary pytest equality assertions. `COL-012` follows Google-style `Raises:` documentation and permits it only where the function itself directly raises.
27
+
28
+ ## Configuration and strict mode
29
+
30
+ `.colint.toml` is discovered from the current directory upward. Its top-level `warnings_as_errors` boolean escalates warning-only results. `[rules]` maps a rule code to `true` or `false`, enabling or disabling it.
31
+
32
+ `--strict` overrides individual rule disables, enables every registered rule, and treats warnings as errors.
33
+
34
+ ## Exit statuses
35
+
36
+ | Status | Meaning |
37
+ | --- | --- |
38
+ | 0 | No errors; warnings are permitted unless escalated. |
39
+ | 1 | Warnings only, escalated through `warnings_as_errors` or `--strict`. |
40
+ | 2 | At least one native error-level finding. |
41
+
42
+ ## Suppressions
43
+
44
+ `# noqa` suppresses all diagnostics on its source line. `# colint: ignore[COL-003,COL-010]` suppresses only the listed rule codes on that line. For nested imports, the justification comment must immediately precede the contiguous import group; it may be a multiline comment and applies to all imports in that group.
45
+
46
+ ## Input and output
47
+
48
+ The CLI accepts Python files and directories, recursively scans `*.py`, and ignores common generated and virtual-environment directories. Diagnostics use `path:line:column: COL-NNN - message [severity]`, include a fix recommendation, and `--json` emits structured diagnostics. Python 3.10+ syntax is targeted. Automatic rewriting is intentionally not part of this first release.
49
+
50
+ ## Rust quality gates
51
+
52
+ The repository uses `cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test`. GitHub Actions runs all three checks on every push and pull request.
colint-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 colint contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.