@shakibkhatri/idiolect-core 0.0.1 → 0.1.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 (47) hide show
  1. package/dist/analyzer-go.js +3 -5
  2. package/dist/analyzer-go.js.map +1 -1
  3. package/dist/analyzer-py.js +3 -5
  4. package/dist/analyzer-py.js.map +1 -1
  5. package/dist/analyzer.d.ts +3 -1
  6. package/dist/analyzer.js +10 -5
  7. package/dist/analyzer.js.map +1 -1
  8. package/dist/baseline.js +3 -2
  9. package/dist/baseline.js.map +1 -1
  10. package/dist/check.d.ts +5 -0
  11. package/dist/check.js +6 -5
  12. package/dist/check.js.map +1 -1
  13. package/dist/collector.d.ts +1 -0
  14. package/dist/collector.js +18 -7
  15. package/dist/collector.js.map +1 -1
  16. package/dist/config.d.ts +21 -0
  17. package/dist/config.js +13 -0
  18. package/dist/config.js.map +1 -1
  19. package/dist/index.d.ts +5 -3
  20. package/dist/index.js +5 -3
  21. package/dist/index.js.map +1 -1
  22. package/dist/llm.js +46 -29
  23. package/dist/llm.js.map +1 -1
  24. package/dist/metrics.js +1 -0
  25. package/dist/metrics.js.map +1 -1
  26. package/dist/profile.d.ts +10 -0
  27. package/dist/profile.js +16 -2
  28. package/dist/profile.js.map +1 -1
  29. package/dist/render.d.ts +1 -0
  30. package/dist/render.js +55 -9
  31. package/dist/render.js.map +1 -1
  32. package/dist/served.d.ts +8 -0
  33. package/dist/served.js +39 -0
  34. package/dist/served.js.map +1 -0
  35. package/dist/styles.d.ts +41 -0
  36. package/dist/styles.js +77 -0
  37. package/dist/styles.js.map +1 -0
  38. package/dist/unbot.js +2 -2
  39. package/dist/unbot.js.map +1 -1
  40. package/dist/writer.d.ts +4 -3
  41. package/dist/writer.js +14 -5
  42. package/dist/writer.js.map +1 -1
  43. package/package.json +2 -1
  44. package/styles/go-caddy.json +1369 -0
  45. package/styles/kotlin-tivi.json +1506 -0
  46. package/styles/python-httpx.json +1053 -0
  47. package/styles/typescript-vue.json +1474 -0
@@ -0,0 +1,1053 @@
1
+ {
2
+ "version": 1,
3
+ "id": "python-httpx",
4
+ "title": "HTTPX",
5
+ "summary": "Sparse sentence comments, f-strings, small flat functions",
6
+ "language": "python",
7
+ "experimental": true,
8
+ "source": {
9
+ "project": "github.com/encode/httpx",
10
+ "license": "BSD-3-Clause",
11
+ "commit": "dd5304d3eb97f0aad7126a45f3fd7041dfee0ac2",
12
+ "snapshot": "2023-12-28T13:10:37Z",
13
+ "lines": 9945
14
+ },
15
+ "stats": {
16
+ "files": 53,
17
+ "loc": 9945,
18
+ "functions": {
19
+ "count": 769,
20
+ "blockBody": 769,
21
+ "expressionBody": 0,
22
+ "lengthLines": {
23
+ "2": 76,
24
+ "3": 66,
25
+ "4": 65,
26
+ "5": 50,
27
+ "6": 61,
28
+ "7": 42,
29
+ "8": 40,
30
+ "9": 30,
31
+ "10": 37,
32
+ "11": 24,
33
+ "12": 32,
34
+ "13": 28,
35
+ "14": 25,
36
+ "15": 18,
37
+ "16": 11,
38
+ "17": 6,
39
+ "18": 8,
40
+ "19": 10,
41
+ "20": 16,
42
+ "21": 7,
43
+ "22": 5,
44
+ "23": 7,
45
+ "24": 5,
46
+ "25": 9,
47
+ "26": 4,
48
+ "27": 2,
49
+ "28": 9,
50
+ "29": 7,
51
+ "30": 2,
52
+ "31": 3,
53
+ "33": 7,
54
+ "34": 2,
55
+ "35": 4,
56
+ "36": 8,
57
+ "37": 3,
58
+ "38": 5,
59
+ "40": 1,
60
+ "43": 3,
61
+ "44": 2,
62
+ "45": 1,
63
+ "47": 2,
64
+ "48": 3,
65
+ "50": 4,
66
+ "52": 1,
67
+ "53": 1,
68
+ "54": 4,
69
+ "55": 1,
70
+ "59": 1,
71
+ "60": 1,
72
+ "63": 1,
73
+ "75": 1,
74
+ "77": 1,
75
+ "78": 1,
76
+ "89": 1,
77
+ "92": 1,
78
+ "94": 2,
79
+ "106": 1,
80
+ "133": 1
81
+ },
82
+ "params": {
83
+ "0": 453,
84
+ "1": 185,
85
+ "2": 46,
86
+ "3": 28,
87
+ "4": 12,
88
+ "5": 4,
89
+ "6": 1,
90
+ "7": 2,
91
+ "8": 10,
92
+ "11": 6,
93
+ "12": 10,
94
+ "13": 4,
95
+ "16": 3,
96
+ "17": 3,
97
+ "21": 2
98
+ },
99
+ "maxNesting": {
100
+ "0": 484,
101
+ "1": 197,
102
+ "2": 64,
103
+ "3": 18,
104
+ "4": 4,
105
+ "5": 2
106
+ },
107
+ "earlyReturn": 75
108
+ },
109
+ "naming": {
110
+ "casing": {
111
+ "function": {
112
+ "camel": 108,
113
+ "pascal": 0,
114
+ "snake": 140,
115
+ "screaming": 0,
116
+ "backtick": 0,
117
+ "other": 0
118
+ },
119
+ "class": {
120
+ "camel": 1,
121
+ "pascal": 87,
122
+ "snake": 0,
123
+ "screaming": 1,
124
+ "backtick": 0,
125
+ "other": 0
126
+ },
127
+ "property": {
128
+ "camel": 133,
129
+ "pascal": 7,
130
+ "snake": 47,
131
+ "screaming": 76,
132
+ "backtick": 0,
133
+ "other": 1
134
+ },
135
+ "local": {
136
+ "camel": 1059,
137
+ "pascal": 2,
138
+ "snake": 229,
139
+ "screaming": 2,
140
+ "backtick": 0,
141
+ "other": 0
142
+ },
143
+ "parameter": {
144
+ "camel": 0,
145
+ "pascal": 0,
146
+ "snake": 0,
147
+ "screaming": 0,
148
+ "backtick": 0,
149
+ "other": 0
150
+ },
151
+ "constant": {
152
+ "camel": 2,
153
+ "pascal": 0,
154
+ "snake": 0,
155
+ "screaming": 8,
156
+ "backtick": 0,
157
+ "other": 2
158
+ }
159
+ },
160
+ "nameLength": {
161
+ "function": {
162
+ "3": 14,
163
+ "4": 18,
164
+ "5": 23,
165
+ "6": 27,
166
+ "7": 14,
167
+ "8": 21,
168
+ "9": 10,
169
+ "10": 9,
170
+ "11": 16,
171
+ "12": 4,
172
+ "13": 7,
173
+ "14": 18,
174
+ "15": 13,
175
+ "16": 7,
176
+ "17": 8,
177
+ "18": 6,
178
+ "19": 2,
179
+ "20": 9,
180
+ "21": 5,
181
+ "22": 6,
182
+ "23": 7,
183
+ "24": 2,
184
+ "26": 1,
185
+ "27": 1
186
+ },
187
+ "class": {
188
+ "3": 2,
189
+ "4": 2,
190
+ "5": 3,
191
+ "6": 1,
192
+ "7": 4,
193
+ "8": 1,
194
+ "9": 12,
195
+ "10": 5,
196
+ "11": 9,
197
+ "12": 6,
198
+ "13": 9,
199
+ "14": 8,
200
+ "15": 8,
201
+ "16": 6,
202
+ "18": 5,
203
+ "19": 3,
204
+ "20": 3,
205
+ "21": 1,
206
+ "23": 1
207
+ },
208
+ "property": {
209
+ "1": 4,
210
+ "2": 1,
211
+ "3": 8,
212
+ "4": 15,
213
+ "5": 23,
214
+ "6": 30,
215
+ "7": 27,
216
+ "8": 22,
217
+ "9": 21,
218
+ "10": 14,
219
+ "11": 11,
220
+ "12": 13,
221
+ "13": 7,
222
+ "14": 5,
223
+ "15": 10,
224
+ "16": 9,
225
+ "17": 4,
226
+ "18": 8,
227
+ "19": 9,
228
+ "20": 5,
229
+ "21": 5,
230
+ "22": 3,
231
+ "23": 2,
232
+ "24": 1,
233
+ "25": 1,
234
+ "26": 1,
235
+ "29": 2,
236
+ "31": 3
237
+ },
238
+ "local": {
239
+ "1": 34,
240
+ "2": 1,
241
+ "3": 165,
242
+ "4": 90,
243
+ "5": 58,
244
+ "6": 150,
245
+ "7": 300,
246
+ "8": 247,
247
+ "9": 38,
248
+ "10": 33,
249
+ "11": 57,
250
+ "12": 32,
251
+ "13": 22,
252
+ "14": 22,
253
+ "15": 13,
254
+ "16": 14,
255
+ "17": 8,
256
+ "18": 2,
257
+ "19": 1,
258
+ "21": 2,
259
+ "22": 3
260
+ },
261
+ "parameter": {},
262
+ "constant": {
263
+ "3": 1,
264
+ "6": 1,
265
+ "9": 1,
266
+ "10": 2,
267
+ "14": 1,
268
+ "15": 2,
269
+ "16": 1,
270
+ "18": 1,
271
+ "21": 1,
272
+ "33": 1
273
+ }
274
+ },
275
+ "functionVerb": {
276
+ "main": 2,
277
+ "request": 3,
278
+ "stream": 3,
279
+ "get": 18,
280
+ "options": 3,
281
+ "head": 3,
282
+ "post": 3,
283
+ "put": 3,
284
+ "patch": 3,
285
+ "delete": 3,
286
+ "auth": 5,
287
+ "build": 4,
288
+ "parse": 1,
289
+ "resolve": 1,
290
+ "close": 7,
291
+ "aclose": 5,
292
+ "enforce": 1,
293
+ "event": 1,
294
+ "base": 2,
295
+ "merge": 4,
296
+ "redirect": 4,
297
+ "init": 4,
298
+ "transport": 2,
299
+ "send": 8,
300
+ "load": 3,
301
+ "create": 1,
302
+ "as": 1,
303
+ "raw": 5,
304
+ "encode": 9,
305
+ "decode": 9,
306
+ "flush": 9,
307
+ "print": 4,
308
+ "format": 3,
309
+ "download": 1,
310
+ "validate": 3,
311
+ "handle": 9,
312
+ "encoding": 4,
313
+ "prepare": 2,
314
+ "content": 2,
315
+ "read": 2,
316
+ "aread": 2,
317
+ "elapsed": 2,
318
+ "http": 1,
319
+ "reason": 1,
320
+ "url": 1,
321
+ "text": 1,
322
+ "charset": 1,
323
+ "is": 16,
324
+ "has": 1,
325
+ "cookies": 1,
326
+ "iter": 3,
327
+ "aiter": 1,
328
+ "extract": 1,
329
+ "set": 3,
330
+ "add": 2,
331
+ "info": 1,
332
+ "render": 6,
333
+ "map": 1,
334
+ "start": 1,
335
+ "authority": 1,
336
+ "netloc": 2,
337
+ "copy": 6,
338
+ "urlparse": 1,
339
+ "normalize": 4,
340
+ "percent": 2,
341
+ "quote": 1,
342
+ "urlencode": 1,
343
+ "scheme": 1,
344
+ "userinfo": 1,
345
+ "username": 1,
346
+ "password": 1,
347
+ "host": 1,
348
+ "port": 2,
349
+ "path": 1,
350
+ "query": 1,
351
+ "params": 1,
352
+ "fragment": 1,
353
+ "join": 1,
354
+ "multi": 1,
355
+ "remove": 1,
356
+ "primitive": 1,
357
+ "replacer": 1,
358
+ "same": 1,
359
+ "to": 1,
360
+ "peek": 1,
361
+ "sync": 2,
362
+ "async": 2,
363
+ "matches": 1
364
+ },
365
+ "booleanPrefix": {
366
+ "requires": 1,
367
+ "eq": 6,
368
+ "is": 26,
369
+ "first": 2,
370
+ "contains": 2,
371
+ "has": 1,
372
+ "bool": 2,
373
+ "response": 2,
374
+ "same": 1,
375
+ "matches": 1,
376
+ "stream": 2,
377
+ "more": 2
378
+ },
379
+ "abbreviated": 52,
380
+ "identifiers": 1905,
381
+ "testNames": {},
382
+ "genericNames": 4
383
+ },
384
+ "tests": {
385
+ "files": 30,
386
+ "loc": 4345,
387
+ "functions": 423
388
+ },
389
+ "comments": {
390
+ "line": 488,
391
+ "block": 0,
392
+ "doc": 244,
393
+ "chars": 61142,
394
+ "lowercaseStart": 185,
395
+ "trailingPeriod": 391,
396
+ "todo": {},
397
+ "tells": {
398
+ "restates": 5,
399
+ "buzzword": 17
400
+ },
401
+ "publicDecls": 899,
402
+ "publicDocumented": 221,
403
+ "privateDecls": 37,
404
+ "privateDocumented": 18
405
+ },
406
+ "errors": {
407
+ "tryCatch": 44,
408
+ "runCatching": 0,
409
+ "resultType": 0,
410
+ "forceUnwrap": 0
411
+ },
412
+ "kotlin": {
413
+ "when3": 0,
414
+ "ifElseChain3": 0,
415
+ "sealedInterface": 0,
416
+ "sealedClass": 0,
417
+ "extensionFunctions": 0,
418
+ "dataClasses": 0,
419
+ "composables": 0,
420
+ "modifierParamFirst": 0,
421
+ "modifierParamLater": 0,
422
+ "remember": 0
423
+ },
424
+ "typescript": {
425
+ "arrowFunctions": 0,
426
+ "functionDeclarations": 0,
427
+ "typeAliases": 0,
428
+ "interfaces": 0,
429
+ "optionalChains": 0,
430
+ "anyTypes": 0
431
+ },
432
+ "python": {
433
+ "typeHinted": 387,
434
+ "fStrings": 103,
435
+ "formatCalls": 0,
436
+ "comprehensions": 79,
437
+ "bareExcepts": 0,
438
+ "dataclasses": 0
439
+ },
440
+ "go": {
441
+ "errChecks": 0,
442
+ "namedReturns": 0,
443
+ "structs": 0,
444
+ "interfaces": 0,
445
+ "panics": 0
446
+ }
447
+ },
448
+ "commitStats": {
449
+ "count": 632,
450
+ "subjectLength": {
451
+ "5": 4,
452
+ "7": 3,
453
+ "8": 1,
454
+ "9": 1,
455
+ "10": 5,
456
+ "11": 7,
457
+ "12": 6,
458
+ "13": 31,
459
+ "14": 7,
460
+ "15": 8,
461
+ "16": 35,
462
+ "17": 12,
463
+ "18": 14,
464
+ "19": 17,
465
+ "20": 15,
466
+ "21": 11,
467
+ "22": 39,
468
+ "23": 15,
469
+ "24": 12,
470
+ "25": 12,
471
+ "26": 17,
472
+ "27": 15,
473
+ "28": 15,
474
+ "29": 12,
475
+ "30": 13,
476
+ "31": 10,
477
+ "32": 15,
478
+ "33": 11,
479
+ "34": 10,
480
+ "35": 17,
481
+ "36": 15,
482
+ "37": 10,
483
+ "38": 8,
484
+ "39": 11,
485
+ "40": 7,
486
+ "41": 9,
487
+ "42": 6,
488
+ "43": 8,
489
+ "44": 6,
490
+ "45": 8,
491
+ "46": 10,
492
+ "47": 4,
493
+ "48": 6,
494
+ "49": 9,
495
+ "50": 4,
496
+ "51": 9,
497
+ "52": 7,
498
+ "53": 4,
499
+ "54": 4,
500
+ "55": 7,
501
+ "56": 10,
502
+ "57": 5,
503
+ "58": 4,
504
+ "59": 6,
505
+ "60": 4,
506
+ "61": 4,
507
+ "62": 2,
508
+ "63": 4,
509
+ "64": 3,
510
+ "65": 2,
511
+ "66": 3,
512
+ "67": 4,
513
+ "68": 2,
514
+ "69": 4,
515
+ "70": 1,
516
+ "71": 4,
517
+ "72": 3,
518
+ "73": 1,
519
+ "74": 4,
520
+ "75": 1,
521
+ "76": 3,
522
+ "77": 1,
523
+ "78": 1,
524
+ "79": 2,
525
+ "80": 3,
526
+ "83": 1,
527
+ "84": 1,
528
+ "87": 1,
529
+ "88": 2,
530
+ "96": 2,
531
+ "98": 1,
532
+ "116": 1
533
+ },
534
+ "lowercaseStart": 12,
535
+ "conventionalPrefix": 0,
536
+ "trailingPeriod": 2,
537
+ "withBody": 232,
538
+ "bodyLines": 1055,
539
+ "bodyLinesWrapped": 1037,
540
+ "tense": {
541
+ "imperative": 608,
542
+ "thirdPerson": 18,
543
+ "past": 6
544
+ }
545
+ },
546
+ "rules": [
547
+ {
548
+ "id": "python.functions.length-p50.value",
549
+ "scope": "personal",
550
+ "language": "python",
551
+ "category": "structure",
552
+ "kind": "voice",
553
+ "text": "Keep functions short. Typical length is 8 lines, 90% are under 28 lines.",
554
+ "evidence": {
555
+ "metric": {
556
+ "name": "functions.length-p50",
557
+ "value": 8,
558
+ "sampleSize": 769
559
+ },
560
+ "examples": []
561
+ },
562
+ "confidence": 0.8,
563
+ "status": "auto"
564
+ },
565
+ {
566
+ "id": "python.functions.params-p90.value",
567
+ "scope": "personal",
568
+ "language": "python",
569
+ "category": "structure",
570
+ "kind": "voice",
571
+ "text": "Functions take at most 3 parameters in 90% of cases.",
572
+ "evidence": {
573
+ "metric": {
574
+ "name": "functions.params-p90",
575
+ "value": 3,
576
+ "sampleSize": 769
577
+ },
578
+ "examples": []
579
+ },
580
+ "confidence": 0.8,
581
+ "status": "auto"
582
+ },
583
+ {
584
+ "id": "python.functions.nesting-p90.value",
585
+ "scope": "personal",
586
+ "language": "python",
587
+ "category": "structure",
588
+ "kind": "voice",
589
+ "text": "Keep nesting shallow. 90% of functions nest at most 2 levels deep.",
590
+ "evidence": {
591
+ "metric": {
592
+ "name": "functions.nesting-p90",
593
+ "value": 2,
594
+ "sampleSize": 769
595
+ },
596
+ "examples": []
597
+ },
598
+ "confidence": 0.8,
599
+ "status": "auto"
600
+ },
601
+ {
602
+ "id": "python.naming.abbreviation-ratio.low",
603
+ "scope": "personal",
604
+ "language": "python",
605
+ "category": "naming",
606
+ "kind": "voice",
607
+ "text": "Spell names out. Avoid abbreviations.",
608
+ "evidence": {
609
+ "metric": {
610
+ "name": "naming.abbreviation-ratio",
611
+ "value": 0.027,
612
+ "sampleSize": 1905
613
+ },
614
+ "examples": []
615
+ },
616
+ "confidence": 0.96,
617
+ "status": "auto"
618
+ },
619
+ {
620
+ "id": "python.comments.per-100-loc.value",
621
+ "scope": "personal",
622
+ "language": "python",
623
+ "category": "comments",
624
+ "kind": "voice",
625
+ "text": "Comment sparingly. About 7.4 comments per 100 lines of code.",
626
+ "evidence": {
627
+ "metric": {
628
+ "name": "comments.per-100-loc",
629
+ "value": 7.36,
630
+ "sampleSize": 9945
631
+ },
632
+ "examples": []
633
+ },
634
+ "confidence": 0.8,
635
+ "status": "auto"
636
+ },
637
+ {
638
+ "id": "python.comments.avg-chars.value",
639
+ "scope": "personal",
640
+ "language": "python",
641
+ "category": "comments",
642
+ "kind": "voice",
643
+ "text": "Comments average 84 characters.",
644
+ "evidence": {
645
+ "metric": {
646
+ "name": "comments.avg-chars",
647
+ "value": 84,
648
+ "sampleSize": 732
649
+ },
650
+ "examples": []
651
+ },
652
+ "confidence": 0.8,
653
+ "status": "auto"
654
+ },
655
+ {
656
+ "id": "python.python.fstring-ratio.high",
657
+ "scope": "personal",
658
+ "language": "python",
659
+ "category": "structure",
660
+ "kind": "idiom",
661
+ "text": "Format strings with f-strings, not .format().",
662
+ "evidence": {
663
+ "metric": {
664
+ "name": "python.fstring-ratio",
665
+ "value": 1,
666
+ "sampleSize": 103
667
+ },
668
+ "examples": []
669
+ },
670
+ "confidence": 0.96,
671
+ "status": "auto"
672
+ },
673
+ {
674
+ "id": "python.python.comprehension-per-kloc.value",
675
+ "scope": "personal",
676
+ "language": "python",
677
+ "category": "structure",
678
+ "kind": "idiom",
679
+ "text": "Comprehensions are common, about 7.9 per 1000 lines.",
680
+ "evidence": {
681
+ "metric": {
682
+ "name": "python.comprehension-per-kloc",
683
+ "value": 7.944,
684
+ "sampleSize": 9945
685
+ },
686
+ "examples": []
687
+ },
688
+ "confidence": 0.8,
689
+ "status": "auto"
690
+ },
691
+ {
692
+ "id": "avoid.python.comments.buzzwords",
693
+ "scope": "personal",
694
+ "language": "python",
695
+ "category": "avoid",
696
+ "kind": "voice",
697
+ "text": "Do not use words like robust, seamless, leverage, comprehensive, utilize, streamline, crucial or delve in comments.",
698
+ "evidence": {
699
+ "metric": {
700
+ "name": "comments.buzzword-ratio",
701
+ "value": 0.023,
702
+ "sampleSize": 732
703
+ },
704
+ "examples": []
705
+ },
706
+ "confidence": 0.96,
707
+ "status": "auto"
708
+ },
709
+ {
710
+ "id": "avoid.python.comments.restating",
711
+ "scope": "personal",
712
+ "language": "python",
713
+ "category": "avoid",
714
+ "kind": "voice",
715
+ "text": "Do not start comments with \"This function\", \"This method\" or \"This class\". Say what is not obvious from the code, or write nothing.",
716
+ "evidence": {
717
+ "metric": {
718
+ "name": "comments.restates-ratio",
719
+ "value": 0.007,
720
+ "sampleSize": 732
721
+ },
722
+ "examples": []
723
+ },
724
+ "confidence": 0.98,
725
+ "status": "auto"
726
+ },
727
+ {
728
+ "id": "avoid.python.comments.emoji",
729
+ "scope": "personal",
730
+ "language": "python",
731
+ "category": "avoid",
732
+ "kind": "voice",
733
+ "text": "No emoji in comments.",
734
+ "evidence": {
735
+ "metric": {
736
+ "name": "comments.emoji-ratio",
737
+ "value": 0,
738
+ "sampleSize": 732
739
+ },
740
+ "examples": []
741
+ },
742
+ "confidence": 0.99,
743
+ "status": "auto"
744
+ },
745
+ {
746
+ "id": "avoid.python.naming.generic",
747
+ "scope": "personal",
748
+ "language": "python",
749
+ "category": "avoid",
750
+ "kind": "voice",
751
+ "text": "No generic names like handleData, processItem, result2 or helper. Name the thing after what it is.",
752
+ "evidence": {
753
+ "metric": {
754
+ "name": "naming.generic-ratio",
755
+ "value": 0.016,
756
+ "sampleSize": 248
757
+ },
758
+ "examples": []
759
+ },
760
+ "confidence": 0.96,
761
+ "status": "auto"
762
+ },
763
+ {
764
+ "id": "avoid.python.errors.bare-except",
765
+ "scope": "personal",
766
+ "language": "python",
767
+ "category": "avoid",
768
+ "kind": "voice",
769
+ "text": "Do not use a bare except. Catch the exception you expect.",
770
+ "evidence": {
771
+ "metric": {
772
+ "name": "python.bare-except-per-kloc",
773
+ "value": 0,
774
+ "sampleSize": 9945
775
+ },
776
+ "examples": []
777
+ },
778
+ "confidence": 1,
779
+ "status": "auto"
780
+ },
781
+ {
782
+ "id": "avoid.python.comments.todo",
783
+ "scope": "personal",
784
+ "language": "python",
785
+ "category": "avoid",
786
+ "kind": "voice",
787
+ "text": "Do not leave TODO comments.",
788
+ "evidence": {
789
+ "metric": {
790
+ "name": "comments.todo-ratio",
791
+ "value": 0,
792
+ "sampleSize": 732
793
+ },
794
+ "examples": []
795
+ },
796
+ "confidence": 0.99,
797
+ "status": "auto"
798
+ },
799
+ {
800
+ "id": "any.commits.conventional-ratio.low",
801
+ "scope": "personal",
802
+ "language": "any",
803
+ "category": "commits",
804
+ "kind": "voice",
805
+ "text": "No conventional commit prefixes. Plain sentences.",
806
+ "evidence": {
807
+ "metric": {
808
+ "name": "commits.conventional-ratio",
809
+ "value": 0,
810
+ "sampleSize": 632
811
+ },
812
+ "examples": []
813
+ },
814
+ "confidence": 0.99,
815
+ "status": "auto"
816
+ },
817
+ {
818
+ "id": "any.commits.lowercase-ratio.low",
819
+ "scope": "personal",
820
+ "language": "any",
821
+ "category": "commits",
822
+ "kind": "voice",
823
+ "text": "Commit subjects start with a capital letter.",
824
+ "evidence": {
825
+ "metric": {
826
+ "name": "commits.lowercase-ratio",
827
+ "value": 0.019,
828
+ "sampleSize": 632
829
+ },
830
+ "examples": []
831
+ },
832
+ "confidence": 0.97,
833
+ "status": "auto"
834
+ },
835
+ {
836
+ "id": "any.commits.imperative-ratio.high",
837
+ "scope": "personal",
838
+ "language": "any",
839
+ "category": "commits",
840
+ "kind": "voice",
841
+ "text": "Write commit subjects in the imperative: Add, Fix, Remove.",
842
+ "evidence": {
843
+ "metric": {
844
+ "name": "commits.imperative-ratio",
845
+ "value": 0.962,
846
+ "sampleSize": 632
847
+ },
848
+ "examples": []
849
+ },
850
+ "confidence": 0.94,
851
+ "status": "auto"
852
+ },
853
+ {
854
+ "id": "any.commits.trailing-period-ratio.low",
855
+ "scope": "personal",
856
+ "language": "any",
857
+ "category": "commits",
858
+ "kind": "voice",
859
+ "text": "No period at the end of a commit subject.",
860
+ "evidence": {
861
+ "metric": {
862
+ "name": "commits.trailing-period-ratio",
863
+ "value": 0.003,
864
+ "sampleSize": 632
865
+ },
866
+ "examples": []
867
+ },
868
+ "confidence": 0.99,
869
+ "status": "auto"
870
+ },
871
+ {
872
+ "id": "any.commits.body-wrap-ratio.high",
873
+ "scope": "personal",
874
+ "language": "any",
875
+ "category": "commits",
876
+ "kind": "voice",
877
+ "text": "Hard-wrap commit body lines at 72 characters.",
878
+ "evidence": {
879
+ "metric": {
880
+ "name": "commits.body-wrap-ratio",
881
+ "value": 0.983,
882
+ "sampleSize": 1055
883
+ },
884
+ "examples": []
885
+ },
886
+ "confidence": 0.97,
887
+ "status": "auto"
888
+ },
889
+ {
890
+ "id": "any.commits.subject-p50.value",
891
+ "scope": "personal",
892
+ "language": "any",
893
+ "category": "commits",
894
+ "kind": "voice",
895
+ "text": "Commit subjects are about 30 characters.",
896
+ "evidence": {
897
+ "metric": {
898
+ "name": "commits.subject-p50",
899
+ "value": 30,
900
+ "sampleSize": 632
901
+ },
902
+ "examples": []
903
+ },
904
+ "confidence": 0.8,
905
+ "status": "auto"
906
+ },
907
+ {
908
+ "id": "python.comments.test-case-outcome-sentence",
909
+ "scope": "personal",
910
+ "language": "python",
911
+ "category": "comments",
912
+ "kind": "voice",
913
+ "text": "In tests, introduce each case with a one-line comment stating the expected outcome as a plain sentence, e.g. \"Not proxied if NO_PROXY matches URL.\" or \"If the port matches the scheme default it is normalized to None.\" Group sections with a terse heading like \"Tests for invalid URLs\".",
914
+ "evidence": {
915
+ "examples": [
916
+ {
917
+ "file": "tests/client/test_proxies.py",
918
+ "line": 210,
919
+ "snippet": ""
920
+ },
921
+ {
922
+ "file": "tests/models/test_url.py",
923
+ "line": 247,
924
+ "snippet": ""
925
+ },
926
+ {
927
+ "file": "tests/models/test_url.py",
928
+ "line": 299,
929
+ "snippet": ""
930
+ }
931
+ ]
932
+ },
933
+ "confidence": 0.8,
934
+ "status": "auto"
935
+ },
936
+ {
937
+ "id": "python.comments.quote-literals",
938
+ "scope": "personal",
939
+ "language": "python",
940
+ "category": "comments",
941
+ "kind": "voice",
942
+ "text": "Wrap literal values, header names, keyword arguments and symbols in single quotes or backticks inside comments: \"'WWW-Authenticate: Digest ...'\", \"`httpx.ReadTimeout`\", \"'query' may be 'None'\". Never leave a code token bare in prose.",
943
+ "evidence": {
944
+ "examples": [
945
+ {
946
+ "file": "httpx/_auth.py",
947
+ "line": 213,
948
+ "snippet": ""
949
+ },
950
+ {
951
+ "file": "httpx/_transports/default.py",
952
+ "line": 76,
953
+ "snippet": ""
954
+ },
955
+ {
956
+ "file": "httpx/_urlparse.py",
957
+ "line": 219,
958
+ "snippet": ""
959
+ }
960
+ ]
961
+ },
962
+ "confidence": 0.65,
963
+ "status": "auto"
964
+ },
965
+ {
966
+ "id": "any.commits.drop-tweak-tidy-verbs",
967
+ "scope": "personal",
968
+ "language": "any",
969
+ "category": "commits",
970
+ "kind": "voice",
971
+ "text": "Use \"Drop\" for removals (\"Drop wait_closed\", \"Drop RawURL\"), and \"Tweak\" or \"Tidy up\" for small adjustments (\"Tweak QueryParams implementation\", \"Tidy up redirect tests\"). Avoid \"Remove\", \"Refactor\" and \"Clean up\" for these.",
972
+ "evidence": {
973
+ "examples": [
974
+ {
975
+ "file": "commit:4ed3a8a",
976
+ "line": 0,
977
+ "snippet": ""
978
+ },
979
+ {
980
+ "file": "commit:8fe32c5",
981
+ "line": 0,
982
+ "snippet": ""
983
+ },
984
+ {
985
+ "file": "commit:e40b0bf",
986
+ "line": 0,
987
+ "snippet": ""
988
+ }
989
+ ]
990
+ },
991
+ "confidence": 0.7,
992
+ "status": "auto"
993
+ },
994
+ {
995
+ "id": "any.commits.call-signature-notation",
996
+ "scope": "personal",
997
+ "language": "any",
998
+ "category": "commits",
999
+ "kind": "voice",
1000
+ "text": "Name APIs in commit subjects using call-signature notation with elided arguments, like \"Add Client(http_versions=...) support\" or \"Support `Response(content=<bytes iterator>)`\", wrapping the code in backticks or single quotes.",
1001
+ "evidence": {
1002
+ "examples": [
1003
+ {
1004
+ "file": "commit:b343ee4",
1005
+ "line": 0,
1006
+ "snippet": ""
1007
+ },
1008
+ {
1009
+ "file": "commit:5ee6135",
1010
+ "line": 0,
1011
+ "snippet": ""
1012
+ },
1013
+ {
1014
+ "file": "commit:59914c7",
1015
+ "line": 0,
1016
+ "snippet": ""
1017
+ }
1018
+ ]
1019
+ },
1020
+ "confidence": 0.5,
1021
+ "status": "auto"
1022
+ },
1023
+ {
1024
+ "id": "any.commits.x-not-y-contrast",
1025
+ "scope": "personal",
1026
+ "language": "any",
1027
+ "category": "commits",
1028
+ "kind": "voice",
1029
+ "text": "When a change swaps one behaviour or name for another, phrase the subject as a contrast with a trailing \", not Y\" clause: \"params argument on URL should merge, not replace.\", \"URL.port becomes Optional[int], not int\".",
1030
+ "evidence": {
1031
+ "examples": [
1032
+ {
1033
+ "file": "commit:74e5115",
1034
+ "line": 0,
1035
+ "snippet": ""
1036
+ },
1037
+ {
1038
+ "file": "commit:c089480",
1039
+ "line": 0,
1040
+ "snippet": ""
1041
+ },
1042
+ {
1043
+ "file": "commit:d98e9e7",
1044
+ "line": 0,
1045
+ "snippet": ""
1046
+ }
1047
+ ]
1048
+ },
1049
+ "confidence": 0.4,
1050
+ "status": "auto"
1051
+ }
1052
+ ]
1053
+ }