@shakibkhatri/idiolect-core 0.0.1 → 0.1.0

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 +39 -0
  36. package/dist/styles.js +76 -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 +1368 -0
  45. package/styles/kotlin-tivi.json +1505 -0
  46. package/styles/python-httpx.json +1052 -0
  47. package/styles/typescript-vue.json +1473 -0
@@ -0,0 +1,1368 @@
1
+ {
2
+ "version": 1,
3
+ "id": "go-caddy",
4
+ "title": "Caddy",
5
+ "language": "go",
6
+ "experimental": true,
7
+ "source": {
8
+ "project": "github.com/caddyserver/caddy",
9
+ "license": "Apache-2.0",
10
+ "commit": "8f9ffc587e622b6e48e9816fe69bbb9cff3073fe",
11
+ "snapshot": "2023-12-30T18:47:13Z",
12
+ "lines": 34809
13
+ },
14
+ "stats": {
15
+ "files": 181,
16
+ "loc": 34809,
17
+ "functions": {
18
+ "count": 1018,
19
+ "blockBody": 1018,
20
+ "expressionBody": 0,
21
+ "lengthLines": {
22
+ "1": 72,
23
+ "3": 136,
24
+ "4": 41,
25
+ "5": 46,
26
+ "6": 113,
27
+ "7": 37,
28
+ "8": 35,
29
+ "9": 31,
30
+ "10": 25,
31
+ "11": 17,
32
+ "12": 25,
33
+ "13": 21,
34
+ "14": 18,
35
+ "15": 20,
36
+ "16": 18,
37
+ "17": 7,
38
+ "18": 19,
39
+ "19": 8,
40
+ "20": 12,
41
+ "21": 11,
42
+ "22": 6,
43
+ "23": 8,
44
+ "24": 12,
45
+ "25": 5,
46
+ "26": 10,
47
+ "27": 7,
48
+ "28": 8,
49
+ "29": 12,
50
+ "30": 9,
51
+ "31": 6,
52
+ "32": 11,
53
+ "33": 3,
54
+ "34": 2,
55
+ "35": 6,
56
+ "37": 5,
57
+ "38": 5,
58
+ "39": 5,
59
+ "40": 4,
60
+ "41": 7,
61
+ "42": 4,
62
+ "43": 1,
63
+ "44": 3,
64
+ "45": 7,
65
+ "46": 7,
66
+ "47": 2,
67
+ "48": 2,
68
+ "49": 3,
69
+ "50": 3,
70
+ "51": 1,
71
+ "53": 2,
72
+ "54": 1,
73
+ "55": 1,
74
+ "56": 2,
75
+ "57": 3,
76
+ "58": 3,
77
+ "59": 3,
78
+ "60": 4,
79
+ "61": 3,
80
+ "62": 3,
81
+ "63": 3,
82
+ "64": 3,
83
+ "65": 3,
84
+ "66": 3,
85
+ "67": 6,
86
+ "68": 1,
87
+ "70": 3,
88
+ "71": 4,
89
+ "72": 1,
90
+ "73": 3,
91
+ "74": 1,
92
+ "75": 3,
93
+ "76": 1,
94
+ "78": 2,
95
+ "79": 1,
96
+ "81": 1,
97
+ "82": 2,
98
+ "84": 4,
99
+ "85": 2,
100
+ "86": 3,
101
+ "89": 2,
102
+ "91": 2,
103
+ "92": 4,
104
+ "93": 4,
105
+ "94": 1,
106
+ "95": 1,
107
+ "98": 3,
108
+ "102": 1,
109
+ "105": 1,
110
+ "106": 1,
111
+ "107": 1,
112
+ "109": 1,
113
+ "111": 1,
114
+ "112": 1,
115
+ "113": 1,
116
+ "116": 1,
117
+ "121": 1,
118
+ "124": 1,
119
+ "125": 3,
120
+ "129": 1,
121
+ "136": 1,
122
+ "138": 1,
123
+ "139": 1,
124
+ "141": 2,
125
+ "144": 1,
126
+ "148": 1,
127
+ "149": 2,
128
+ "150": 1,
129
+ "154": 1,
130
+ "162": 1,
131
+ "165": 1,
132
+ "167": 1,
133
+ "168": 1,
134
+ "174": 1,
135
+ "178": 1,
136
+ "192": 1,
137
+ "196": 1,
138
+ "197": 1,
139
+ "217": 1,
140
+ "233": 1,
141
+ "243": 1,
142
+ "253": 1,
143
+ "254": 1,
144
+ "271": 1,
145
+ "283": 1,
146
+ "286": 1,
147
+ "349": 1,
148
+ "360": 1,
149
+ "364": 1,
150
+ "373": 1,
151
+ "403": 1,
152
+ "511": 1,
153
+ "698": 1
154
+ },
155
+ "params": {
156
+ "0": 377,
157
+ "1": 440,
158
+ "2": 147,
159
+ "3": 41,
160
+ "4": 10,
161
+ "5": 3
162
+ },
163
+ "maxNesting": {
164
+ "0": 303,
165
+ "1": 337,
166
+ "2": 208,
167
+ "3": 93,
168
+ "4": 48,
169
+ "5": 15,
170
+ "6": 5,
171
+ "7": 7,
172
+ "8": 2
173
+ },
174
+ "earlyReturn": 416
175
+ },
176
+ "naming": {
177
+ "casing": {
178
+ "function": {
179
+ "camel": 356,
180
+ "pascal": 570,
181
+ "snake": 0,
182
+ "screaming": 0,
183
+ "backtick": 0,
184
+ "other": 0
185
+ },
186
+ "class": {
187
+ "camel": 70,
188
+ "pascal": 199,
189
+ "snake": 0,
190
+ "screaming": 3,
191
+ "backtick": 0,
192
+ "other": 0
193
+ },
194
+ "property": {
195
+ "camel": 399,
196
+ "pascal": 443,
197
+ "snake": 0,
198
+ "screaming": 20,
199
+ "backtick": 0,
200
+ "other": 10
201
+ },
202
+ "local": {
203
+ "camel": 2754,
204
+ "pascal": 3,
205
+ "snake": 0,
206
+ "screaming": 0,
207
+ "backtick": 0,
208
+ "other": 154
209
+ },
210
+ "parameter": {
211
+ "camel": 1533,
212
+ "pascal": 0,
213
+ "snake": 0,
214
+ "screaming": 0,
215
+ "backtick": 0,
216
+ "other": 22
217
+ },
218
+ "constant": {
219
+ "camel": 44,
220
+ "pascal": 40,
221
+ "snake": 0,
222
+ "screaming": 0,
223
+ "backtick": 0,
224
+ "other": 0
225
+ }
226
+ },
227
+ "nameLength": {
228
+ "function": {
229
+ "2": 3,
230
+ "3": 12,
231
+ "4": 107,
232
+ "5": 62,
233
+ "6": 54,
234
+ "7": 37,
235
+ "8": 56,
236
+ "9": 125,
237
+ "10": 45,
238
+ "11": 114,
239
+ "12": 35,
240
+ "13": 43,
241
+ "14": 29,
242
+ "15": 27,
243
+ "16": 26,
244
+ "17": 18,
245
+ "18": 56,
246
+ "19": 17,
247
+ "20": 11,
248
+ "21": 9,
249
+ "22": 3,
250
+ "23": 11,
251
+ "24": 8,
252
+ "25": 4,
253
+ "26": 3,
254
+ "28": 2,
255
+ "29": 3,
256
+ "30": 5,
257
+ "33": 1
258
+ },
259
+ "class": {
260
+ "2": 1,
261
+ "3": 4,
262
+ "4": 5,
263
+ "5": 5,
264
+ "6": 11,
265
+ "7": 20,
266
+ "8": 20,
267
+ "9": 18,
268
+ "10": 19,
269
+ "11": 29,
270
+ "12": 26,
271
+ "13": 15,
272
+ "14": 28,
273
+ "15": 13,
274
+ "16": 21,
275
+ "17": 6,
276
+ "18": 9,
277
+ "19": 6,
278
+ "20": 5,
279
+ "21": 6,
280
+ "22": 1,
281
+ "23": 1,
282
+ "25": 2,
283
+ "27": 1
284
+ },
285
+ "property": {
286
+ "1": 19,
287
+ "2": 23,
288
+ "3": 45,
289
+ "4": 77,
290
+ "5": 77,
291
+ "6": 111,
292
+ "7": 83,
293
+ "8": 66,
294
+ "9": 62,
295
+ "10": 60,
296
+ "11": 48,
297
+ "12": 52,
298
+ "13": 34,
299
+ "14": 25,
300
+ "15": 20,
301
+ "16": 14,
302
+ "17": 11,
303
+ "18": 13,
304
+ "19": 8,
305
+ "20": 4,
306
+ "21": 9,
307
+ "22": 1,
308
+ "23": 1,
309
+ "24": 3,
310
+ "25": 2,
311
+ "28": 1,
312
+ "29": 1,
313
+ "31": 2
314
+ },
315
+ "local": {
316
+ "1": 263,
317
+ "2": 294,
318
+ "3": 851,
319
+ "4": 274,
320
+ "5": 154,
321
+ "6": 240,
322
+ "7": 178,
323
+ "8": 161,
324
+ "9": 102,
325
+ "10": 111,
326
+ "11": 74,
327
+ "12": 63,
328
+ "13": 38,
329
+ "14": 30,
330
+ "15": 31,
331
+ "16": 9,
332
+ "17": 14,
333
+ "18": 4,
334
+ "19": 6,
335
+ "20": 4,
336
+ "21": 2,
337
+ "22": 2,
338
+ "23": 2,
339
+ "24": 2,
340
+ "27": 1,
341
+ "31": 1
342
+ },
343
+ "parameter": {
344
+ "1": 610,
345
+ "2": 179,
346
+ "3": 303,
347
+ "4": 121,
348
+ "5": 88,
349
+ "6": 65,
350
+ "7": 48,
351
+ "8": 46,
352
+ "9": 21,
353
+ "10": 23,
354
+ "11": 19,
355
+ "12": 7,
356
+ "13": 7,
357
+ "14": 8,
358
+ "15": 3,
359
+ "16": 2,
360
+ "17": 1,
361
+ "18": 1,
362
+ "19": 2,
363
+ "20": 1
364
+ },
365
+ "constant": {
366
+ "4": 1,
367
+ "5": 4,
368
+ "6": 6,
369
+ "7": 1,
370
+ "8": 3,
371
+ "9": 5,
372
+ "10": 12,
373
+ "11": 5,
374
+ "12": 7,
375
+ "13": 2,
376
+ "14": 4,
377
+ "15": 5,
378
+ "16": 2,
379
+ "17": 3,
380
+ "18": 4,
381
+ "19": 4,
382
+ "20": 4,
383
+ "21": 4,
384
+ "23": 1,
385
+ "24": 1,
386
+ "25": 1,
387
+ "26": 1,
388
+ "27": 3,
389
+ "29": 1
390
+ }
391
+ },
392
+ "functionVerb": {
393
+ "provision": 49,
394
+ "allowed": 1,
395
+ "replace": 7,
396
+ "manage": 2,
397
+ "certmagic": 1,
398
+ "identity": 1,
399
+ "enforce": 1,
400
+ "stop": 7,
401
+ "serve": 22,
402
+ "handle": 10,
403
+ "check": 3,
404
+ "get": 20,
405
+ "origin": 1,
406
+ "unsynced": 3,
407
+ "remove": 2,
408
+ "error": 6,
409
+ "parse": 31,
410
+ "decode": 2,
411
+ "marshal": 10,
412
+ "p": 1,
413
+ "run": 2,
414
+ "load": 10,
415
+ "read": 6,
416
+ "finish": 1,
417
+ "validate": 12,
418
+ "exit": 2,
419
+ "exiting": 1,
420
+ "unmarshal": 42,
421
+ "instance": 1,
422
+ "version": 1,
423
+ "active": 2,
424
+ "new": 15,
425
+ "next": 9,
426
+ "prev": 1,
427
+ "nesting": 1,
428
+ "val": 1,
429
+ "line": 1,
430
+ "file": 2,
431
+ "args": 1,
432
+ "all": 4,
433
+ "remaining": 1,
434
+ "token": 1,
435
+ "reset": 1,
436
+ "arg": 1,
437
+ "syntax": 1,
438
+ "e": 1,
439
+ "err": 1,
440
+ "delete": 2,
441
+ "is": 15,
442
+ "format": 1,
443
+ "begin": 1,
444
+ "addresses": 1,
445
+ "block": 1,
446
+ "directives": 1,
447
+ "do": 5,
448
+ "directive": 3,
449
+ "open": 12,
450
+ "close": 12,
451
+ "dispense": 1,
452
+ "string": 16,
453
+ "register": 7,
454
+ "map": 3,
455
+ "consolidate": 4,
456
+ "listener": 3,
457
+ "normalize": 1,
458
+ "lower": 1,
459
+ "init": 64,
460
+ "caddyfiles": 1,
461
+ "matcher": 2,
462
+ "extract": 1,
463
+ "group": 1,
464
+ "sort": 1,
465
+ "hosts": 2,
466
+ "has": 4,
467
+ "servers": 1,
468
+ "append": 1,
469
+ "compile": 2,
470
+ "encode": 3,
471
+ "slice": 2,
472
+ "listeners": 3,
473
+ "specificity": 1,
474
+ "build": 4,
475
+ "automation": 3,
476
+ "subject": 1,
477
+ "caddy": 74,
478
+ "make": 6,
479
+ "adapt": 1,
480
+ "compare": 3,
481
+ "main": 2,
482
+ "cmd": 9,
483
+ "watch": 1,
484
+ "set": 7,
485
+ "on": 2,
486
+ "app": 3,
487
+ "storage": 7,
488
+ "logger": 3,
489
+ "reuse": 3,
490
+ "listen": 8,
491
+ "unwrap": 5,
492
+ "accept": 4,
493
+ "clear": 1,
494
+ "destruct": 4,
495
+ "join": 2,
496
+ "expand": 1,
497
+ "at": 1,
498
+ "port": 2,
499
+ "split": 2,
500
+ "fake": 1,
501
+ "setup": 1,
502
+ "matches": 1,
503
+ "with": 2,
504
+ "writer": 4,
505
+ "log": 1,
506
+ "namespace": 1,
507
+ "name": 1,
508
+ "modules": 1,
509
+ "start": 4,
510
+ "http": 1,
511
+ "https": 1,
512
+ "skipped": 1,
513
+ "automatic": 2,
514
+ "create": 1,
515
+ "fill": 3,
516
+ "authenticate": 1,
517
+ "correct": 1,
518
+ "prompt": 1,
519
+ "hash": 3,
520
+ "hashes": 1,
521
+ "int": 1,
522
+ "float64": 1,
523
+ "bool": 1,
524
+ "status": 5,
525
+ "sanitized": 1,
526
+ "clean": 3,
527
+ "wrap": 4,
528
+ "match": 18,
529
+ "convert": 1,
530
+ "equal": 1,
531
+ "type": 1,
532
+ "c": 1,
533
+ "enable": 3,
534
+ "add": 49,
535
+ "write": 13,
536
+ "rand": 1,
537
+ "trace": 1,
538
+ "directory": 1,
539
+ "human": 2,
540
+ "len": 4,
541
+ "swap": 4,
542
+ "less": 4,
543
+ "strict": 1,
544
+ "index": 1,
545
+ "transform": 1,
546
+ "not": 1,
547
+ "calculate": 1,
548
+ "redirect": 1,
549
+ "stat": 1,
550
+ "glob": 1,
551
+ "apply": 2,
552
+ "destination": 1,
553
+ "fuzzy": 1,
554
+ "large": 1,
555
+ "initialize": 4,
556
+ "push": 1,
557
+ "size": 1,
558
+ "buffer": 1,
559
+ "buffered": 2,
560
+ "chunked": 1,
561
+ "round": 2,
562
+ "count": 3,
563
+ "available": 1,
564
+ "healthy": 2,
565
+ "full": 1,
566
+ "num": 1,
567
+ "fails": 1,
568
+ "t": 1,
569
+ "cleanup": 3,
570
+ "copy": 5,
571
+ "upgrade": 1,
572
+ "least": 1,
573
+ "host": 1,
574
+ "flush": 1,
575
+ "delayed": 1,
576
+ "expanded": 1,
577
+ "formatted": 1,
578
+ "trim": 1,
579
+ "reverse": 1,
580
+ "change": 1,
581
+ "empty": 1,
582
+ "any": 1,
583
+ "enforcement": 1,
584
+ "should": 1,
585
+ "protocol": 2,
586
+ "prepare": 1,
587
+ "original": 1,
588
+ "clone": 3,
589
+ "execute": 1,
590
+ "header": 1,
591
+ "func": 1,
592
+ "routes": 1,
593
+ "root": 2,
594
+ "intermediate": 1,
595
+ "install": 1,
596
+ "pem": 3,
597
+ "trusted": 1,
598
+ "maintenance": 1,
599
+ "renew": 2,
600
+ "needs": 1,
601
+ "pre": 2,
602
+ "issue": 3,
603
+ "issuer": 3,
604
+ "revoke": 2,
605
+ "only": 1,
606
+ "default": 2,
607
+ "can": 1,
608
+ "select": 1,
609
+ "settings": 1,
610
+ "store": 1,
611
+ "rotate": 4,
612
+ "tls": 1,
613
+ "modify": 1,
614
+ "stay": 1,
615
+ "unregister": 1,
616
+ "generate": 2,
617
+ "keep": 1,
618
+ "cipher": 2,
619
+ "supported": 1,
620
+ "cert": 1,
621
+ "zapcore": 1,
622
+ "filter": 2,
623
+ "dial": 1,
624
+ "sd": 1,
625
+ "ready": 3,
626
+ "reloading": 3,
627
+ "stopping": 3,
628
+ "to": 1,
629
+ "trap": 4,
630
+ "home": 2
631
+ },
632
+ "booleanPrefix": {
633
+ "should": 7,
634
+ "disabled": 5,
635
+ "enforce": 3,
636
+ "origin": 1,
637
+ "exiting": 1,
638
+ "next": 5,
639
+ "prev": 1,
640
+ "args": 1,
641
+ "all": 1,
642
+ "is": 16,
643
+ "eof": 1,
644
+ "directive": 1,
645
+ "has": 4,
646
+ "expect": 13,
647
+ "slice": 2,
648
+ "listeners": 2,
649
+ "automation": 2,
650
+ "subject": 1,
651
+ "use": 1,
652
+ "compare": 1,
653
+ "deadline": 1,
654
+ "matches": 1,
655
+ "logger": 1,
656
+ "disable": 5,
657
+ "ignore": 1,
658
+ "skipped": 1,
659
+ "hashes": 1,
660
+ "merge": 1,
661
+ "bool": 1,
662
+ "status": 1,
663
+ "match": 18,
664
+ "can": 1,
665
+ "less": 4,
666
+ "pass": 1,
667
+ "file": 1,
668
+ "deferred": 1,
669
+ "wrote": 1,
670
+ "provision": 1,
671
+ "fuzzy": 1,
672
+ "large": 1,
673
+ "buffered": 1,
674
+ "chunked": 1,
675
+ "available": 1,
676
+ "healthy": 2,
677
+ "full": 1,
678
+ "set": 1,
679
+ "t": 1,
680
+ "insecure": 1,
681
+ "deprecated": 2,
682
+ "verbose": 1,
683
+ "flush": 1,
684
+ "terminal": 1,
685
+ "empty": 1,
686
+ "any": 1,
687
+ "protocol": 1,
688
+ "close": 1,
689
+ "abort": 1,
690
+ "sign": 3,
691
+ "trusted": 1,
692
+ "needs": 1,
693
+ "must": 1,
694
+ "on": 1,
695
+ "only": 1,
696
+ "settings": 1,
697
+ "handle": 1,
698
+ "cipher": 1,
699
+ "success": 1,
700
+ "roll": 1,
701
+ "soft": 1
702
+ },
703
+ "abbreviated": 1054,
704
+ "identifiers": 6620,
705
+ "testNames": {},
706
+ "genericNames": 0
707
+ },
708
+ "tests": {
709
+ "files": 39,
710
+ "loc": 5773,
711
+ "functions": 92
712
+ },
713
+ "comments": {
714
+ "line": 5664,
715
+ "block": 0,
716
+ "doc": 3565,
717
+ "chars": 430669,
718
+ "lowercaseStart": 5319,
719
+ "trailingPeriod": 2291,
720
+ "todo": {
721
+ "TODO:": 56
722
+ },
723
+ "tells": {
724
+ "buzzword": 30,
725
+ "restates": 15,
726
+ "emoji": 2
727
+ },
728
+ "publicDecls": 900,
729
+ "publicDocumented": 681,
730
+ "privateDecls": 531,
731
+ "privateDocumented": 264
732
+ },
733
+ "errors": {
734
+ "tryCatch": 0,
735
+ "runCatching": 0,
736
+ "resultType": 0,
737
+ "forceUnwrap": 130
738
+ },
739
+ "kotlin": {
740
+ "when3": 0,
741
+ "ifElseChain3": 0,
742
+ "sealedInterface": 0,
743
+ "sealedClass": 0,
744
+ "extensionFunctions": 0,
745
+ "dataClasses": 0,
746
+ "composables": 0,
747
+ "modifierParamFirst": 0,
748
+ "modifierParamLater": 0,
749
+ "remember": 0
750
+ },
751
+ "typescript": {
752
+ "arrowFunctions": 0,
753
+ "functionDeclarations": 0,
754
+ "typeAliases": 0,
755
+ "interfaces": 0,
756
+ "optionalChains": 0,
757
+ "anyTypes": 0
758
+ },
759
+ "python": {
760
+ "typeHinted": 0,
761
+ "fStrings": 0,
762
+ "formatCalls": 0,
763
+ "comprehensions": 0,
764
+ "bareExcepts": 0,
765
+ "dataclasses": 0
766
+ },
767
+ "go": {
768
+ "errChecks": 706,
769
+ "namedReturns": 12,
770
+ "structs": 195,
771
+ "interfaces": 37,
772
+ "panics": 27
773
+ }
774
+ },
775
+ "commitStats": {
776
+ "count": 1003,
777
+ "subjectLength": {
778
+ "4": 1,
779
+ "9": 2,
780
+ "11": 4,
781
+ "12": 4,
782
+ "13": 8,
783
+ "14": 5,
784
+ "15": 3,
785
+ "16": 5,
786
+ "17": 6,
787
+ "18": 8,
788
+ "19": 7,
789
+ "20": 5,
790
+ "21": 4,
791
+ "22": 10,
792
+ "23": 8,
793
+ "24": 10,
794
+ "25": 13,
795
+ "26": 11,
796
+ "27": 15,
797
+ "28": 12,
798
+ "29": 9,
799
+ "30": 11,
800
+ "31": 7,
801
+ "32": 14,
802
+ "33": 19,
803
+ "34": 16,
804
+ "35": 19,
805
+ "36": 19,
806
+ "37": 15,
807
+ "38": 13,
808
+ "39": 16,
809
+ "40": 16,
810
+ "41": 15,
811
+ "42": 17,
812
+ "43": 20,
813
+ "44": 16,
814
+ "45": 21,
815
+ "46": 19,
816
+ "47": 23,
817
+ "48": 23,
818
+ "49": 25,
819
+ "50": 28,
820
+ "51": 27,
821
+ "52": 24,
822
+ "53": 22,
823
+ "54": 27,
824
+ "55": 23,
825
+ "56": 22,
826
+ "57": 21,
827
+ "58": 24,
828
+ "59": 14,
829
+ "60": 19,
830
+ "61": 17,
831
+ "62": 20,
832
+ "63": 23,
833
+ "64": 21,
834
+ "65": 17,
835
+ "66": 24,
836
+ "67": 21,
837
+ "68": 19,
838
+ "69": 29,
839
+ "70": 19,
840
+ "71": 12,
841
+ "72": 18,
842
+ "73": 2,
843
+ "74": 1,
844
+ "75": 2,
845
+ "76": 2,
846
+ "77": 2,
847
+ "78": 2,
848
+ "79": 4,
849
+ "80": 1,
850
+ "85": 1,
851
+ "93": 1
852
+ },
853
+ "lowercaseStart": 745,
854
+ "conventionalPrefix": 14,
855
+ "trailingPeriod": 1,
856
+ "withBody": 445,
857
+ "bodyLines": 1741,
858
+ "bodyLinesWrapped": 1658,
859
+ "tense": {
860
+ "imperative": 997,
861
+ "thirdPerson": 5,
862
+ "past": 1
863
+ }
864
+ },
865
+ "rules": [
866
+ {
867
+ "id": "go.functions.length-p50.value",
868
+ "scope": "personal",
869
+ "language": "go",
870
+ "category": "structure",
871
+ "kind": "voice",
872
+ "text": "Keep functions short. Typical length is 9 lines, 90% are under 67 lines.",
873
+ "evidence": {
874
+ "metric": {
875
+ "name": "functions.length-p50",
876
+ "value": 9,
877
+ "sampleSize": 1018
878
+ },
879
+ "examples": []
880
+ },
881
+ "confidence": 0.8,
882
+ "status": "auto"
883
+ },
884
+ {
885
+ "id": "go.functions.params-p90.value",
886
+ "scope": "personal",
887
+ "language": "go",
888
+ "category": "structure",
889
+ "kind": "voice",
890
+ "text": "Functions take at most 2 parameters in 90% of cases.",
891
+ "evidence": {
892
+ "metric": {
893
+ "name": "functions.params-p90",
894
+ "value": 2,
895
+ "sampleSize": 1018
896
+ },
897
+ "examples": []
898
+ },
899
+ "confidence": 0.8,
900
+ "status": "auto"
901
+ },
902
+ {
903
+ "id": "go.functions.nesting-p90.value",
904
+ "scope": "personal",
905
+ "language": "go",
906
+ "category": "structure",
907
+ "kind": "voice",
908
+ "text": "Keep nesting shallow. 90% of functions nest at most 3 levels deep.",
909
+ "evidence": {
910
+ "metric": {
911
+ "name": "functions.nesting-p90",
912
+ "value": 3,
913
+ "sampleSize": 1018
914
+ },
915
+ "examples": []
916
+ },
917
+ "confidence": 0.8,
918
+ "status": "auto"
919
+ },
920
+ {
921
+ "id": "go.naming.constant-screaming-ratio.low",
922
+ "scope": "personal",
923
+ "language": "go",
924
+ "category": "naming",
925
+ "kind": "voice",
926
+ "text": "Constants are PascalCase or camelCase, not SCREAMING_SNAKE_CASE.",
927
+ "evidence": {
928
+ "metric": {
929
+ "name": "naming.constant-screaming-ratio",
930
+ "value": 0,
931
+ "sampleSize": 84
932
+ },
933
+ "examples": []
934
+ },
935
+ "confidence": 0.96,
936
+ "status": "auto"
937
+ },
938
+ {
939
+ "id": "go.naming.abbreviation-ratio.low",
940
+ "scope": "personal",
941
+ "language": "go",
942
+ "category": "naming",
943
+ "kind": "voice",
944
+ "text": "Spell names out. Avoid abbreviations.",
945
+ "evidence": {
946
+ "metric": {
947
+ "name": "naming.abbreviation-ratio",
948
+ "value": 0.159,
949
+ "sampleSize": 6620
950
+ },
951
+ "examples": []
952
+ },
953
+ "confidence": 0.83,
954
+ "status": "auto"
955
+ },
956
+ {
957
+ "id": "go.comments.per-100-loc.value",
958
+ "scope": "personal",
959
+ "language": "go",
960
+ "category": "comments",
961
+ "kind": "voice",
962
+ "text": "Comment freely. About 26.5 comments per 100 lines of code.",
963
+ "evidence": {
964
+ "metric": {
965
+ "name": "comments.per-100-loc",
966
+ "value": 26.513,
967
+ "sampleSize": 34809
968
+ },
969
+ "examples": []
970
+ },
971
+ "confidence": 0.8,
972
+ "status": "auto"
973
+ },
974
+ {
975
+ "id": "go.comments.avg-chars.value",
976
+ "scope": "personal",
977
+ "language": "go",
978
+ "category": "comments",
979
+ "kind": "voice",
980
+ "text": "Comments average 47 characters.",
981
+ "evidence": {
982
+ "metric": {
983
+ "name": "comments.avg-chars",
984
+ "value": 47,
985
+ "sampleSize": 9229
986
+ },
987
+ "examples": []
988
+ },
989
+ "confidence": 0.8,
990
+ "status": "auto"
991
+ },
992
+ {
993
+ "id": "go.go.err-check-per-kloc.value",
994
+ "scope": "personal",
995
+ "language": "go",
996
+ "category": "errors",
997
+ "kind": "idiom",
998
+ "text": "Check errors inline with if err != nil, about 20.3 per 1000 lines.",
999
+ "evidence": {
1000
+ "metric": {
1001
+ "name": "go.err-check-per-kloc",
1002
+ "value": 20.282,
1003
+ "sampleSize": 34809
1004
+ },
1005
+ "examples": []
1006
+ },
1007
+ "confidence": 0.8,
1008
+ "status": "auto"
1009
+ },
1010
+ {
1011
+ "id": "go.go.named-return-ratio.low",
1012
+ "scope": "personal",
1013
+ "language": "go",
1014
+ "category": "structure",
1015
+ "kind": "idiom",
1016
+ "text": "Do not name return values, return them explicitly.",
1017
+ "evidence": {
1018
+ "metric": {
1019
+ "name": "go.named-return-ratio",
1020
+ "value": 0.012,
1021
+ "sampleSize": 1018
1022
+ },
1023
+ "examples": []
1024
+ },
1025
+ "confidence": 0.98,
1026
+ "status": "auto"
1027
+ },
1028
+ {
1029
+ "id": "avoid.go.comments.buzzwords",
1030
+ "scope": "personal",
1031
+ "language": "go",
1032
+ "category": "avoid",
1033
+ "kind": "voice",
1034
+ "text": "Do not use words like robust, seamless, leverage, comprehensive, utilize, streamline, crucial or delve in comments.",
1035
+ "evidence": {
1036
+ "metric": {
1037
+ "name": "comments.buzzword-ratio",
1038
+ "value": 0.003,
1039
+ "sampleSize": 9229
1040
+ },
1041
+ "examples": []
1042
+ },
1043
+ "confidence": 1,
1044
+ "status": "auto"
1045
+ },
1046
+ {
1047
+ "id": "avoid.go.comments.restating",
1048
+ "scope": "personal",
1049
+ "language": "go",
1050
+ "category": "avoid",
1051
+ "kind": "voice",
1052
+ "text": "Do not start comments with \"This function\", \"This method\" or \"This class\". Say what is not obvious from the code, or write nothing.",
1053
+ "evidence": {
1054
+ "metric": {
1055
+ "name": "comments.restates-ratio",
1056
+ "value": 0.002,
1057
+ "sampleSize": 9229
1058
+ },
1059
+ "examples": []
1060
+ },
1061
+ "confidence": 1,
1062
+ "status": "auto"
1063
+ },
1064
+ {
1065
+ "id": "avoid.go.comments.emoji",
1066
+ "scope": "personal",
1067
+ "language": "go",
1068
+ "category": "avoid",
1069
+ "kind": "voice",
1070
+ "text": "No emoji in comments.",
1071
+ "evidence": {
1072
+ "metric": {
1073
+ "name": "comments.emoji-ratio",
1074
+ "value": 0,
1075
+ "sampleSize": 9229
1076
+ },
1077
+ "examples": []
1078
+ },
1079
+ "confidence": 1,
1080
+ "status": "auto"
1081
+ },
1082
+ {
1083
+ "id": "avoid.go.naming.generic",
1084
+ "scope": "personal",
1085
+ "language": "go",
1086
+ "category": "avoid",
1087
+ "kind": "voice",
1088
+ "text": "No generic names like handleData, processItem, result2 or helper. Name the thing after what it is.",
1089
+ "evidence": {
1090
+ "metric": {
1091
+ "name": "naming.generic-ratio",
1092
+ "value": 0,
1093
+ "sampleSize": 926
1094
+ },
1095
+ "examples": []
1096
+ },
1097
+ "confidence": 1,
1098
+ "status": "auto"
1099
+ },
1100
+ {
1101
+ "id": "avoid.go.comments.todo",
1102
+ "scope": "personal",
1103
+ "language": "go",
1104
+ "category": "avoid",
1105
+ "kind": "voice",
1106
+ "text": "Do not leave TODO comments.",
1107
+ "evidence": {
1108
+ "metric": {
1109
+ "name": "comments.todo-ratio",
1110
+ "value": 0.006,
1111
+ "sampleSize": 9229
1112
+ },
1113
+ "examples": []
1114
+ },
1115
+ "confidence": 0.99,
1116
+ "status": "auto"
1117
+ },
1118
+ {
1119
+ "id": "any.commits.conventional-ratio.low",
1120
+ "scope": "personal",
1121
+ "language": "any",
1122
+ "category": "commits",
1123
+ "kind": "voice",
1124
+ "text": "No conventional commit prefixes. Plain sentences.",
1125
+ "evidence": {
1126
+ "metric": {
1127
+ "name": "commits.conventional-ratio",
1128
+ "value": 0.014,
1129
+ "sampleSize": 1003
1130
+ },
1131
+ "examples": []
1132
+ },
1133
+ "confidence": 0.98,
1134
+ "status": "auto"
1135
+ },
1136
+ {
1137
+ "id": "any.commits.imperative-ratio.high",
1138
+ "scope": "personal",
1139
+ "language": "any",
1140
+ "category": "commits",
1141
+ "kind": "voice",
1142
+ "text": "Write commit subjects in the imperative: Add, Fix, Remove.",
1143
+ "evidence": {
1144
+ "metric": {
1145
+ "name": "commits.imperative-ratio",
1146
+ "value": 0.994,
1147
+ "sampleSize": 1003
1148
+ },
1149
+ "examples": []
1150
+ },
1151
+ "confidence": 0.99,
1152
+ "status": "auto"
1153
+ },
1154
+ {
1155
+ "id": "any.commits.trailing-period-ratio.low",
1156
+ "scope": "personal",
1157
+ "language": "any",
1158
+ "category": "commits",
1159
+ "kind": "voice",
1160
+ "text": "No period at the end of a commit subject.",
1161
+ "evidence": {
1162
+ "metric": {
1163
+ "name": "commits.trailing-period-ratio",
1164
+ "value": 0.001,
1165
+ "sampleSize": 1003
1166
+ },
1167
+ "examples": []
1168
+ },
1169
+ "confidence": 0.99,
1170
+ "status": "auto"
1171
+ },
1172
+ {
1173
+ "id": "any.commits.body-wrap-ratio.high",
1174
+ "scope": "personal",
1175
+ "language": "any",
1176
+ "category": "commits",
1177
+ "kind": "voice",
1178
+ "text": "Hard-wrap commit body lines at 72 characters.",
1179
+ "evidence": {
1180
+ "metric": {
1181
+ "name": "commits.body-wrap-ratio",
1182
+ "value": 0.952,
1183
+ "sampleSize": 1741
1184
+ },
1185
+ "examples": []
1186
+ },
1187
+ "confidence": 0.94,
1188
+ "status": "auto"
1189
+ },
1190
+ {
1191
+ "id": "any.commits.subject-p50.value",
1192
+ "scope": "personal",
1193
+ "language": "any",
1194
+ "category": "commits",
1195
+ "kind": "voice",
1196
+ "text": "Commit subjects are about 50 characters.",
1197
+ "evidence": {
1198
+ "metric": {
1199
+ "name": "commits.subject-p50",
1200
+ "value": 50,
1201
+ "sampleSize": 1003
1202
+ },
1203
+ "examples": []
1204
+ },
1205
+ "confidence": 0.8,
1206
+ "status": "auto"
1207
+ },
1208
+ {
1209
+ "id": "go.comments.doc-starts-with-name",
1210
+ "scope": "personal",
1211
+ "language": "go",
1212
+ "category": "comments",
1213
+ "kind": "voice",
1214
+ "text": "Start doc comments with the identifier followed by a present-tense verb, for unexported names too: \"LoadOrNew loads the value...\", \"shouldLogRequest returns true if this request should be logged.\", \"StderrWriter writes logs to standard error.\"",
1215
+ "evidence": {
1216
+ "examples": [
1217
+ {
1218
+ "file": "usagepool.go",
1219
+ "line": 70,
1220
+ "snippet": ""
1221
+ },
1222
+ {
1223
+ "file": "modules/caddyhttp/server.go",
1224
+ "line": 672,
1225
+ "snippet": ""
1226
+ },
1227
+ {
1228
+ "file": "logging.go",
1229
+ "line": 602,
1230
+ "snippet": ""
1231
+ }
1232
+ ]
1233
+ },
1234
+ "confidence": 0.9,
1235
+ "status": "auto"
1236
+ },
1237
+ {
1238
+ "id": "go.comments.informal-we-asides",
1239
+ "scope": "personal",
1240
+ "language": "go",
1241
+ "category": "comments",
1242
+ "kind": "voice",
1243
+ "text": "Write inline comments lowercase, explaining why rather than what: \"unless it is a Tailscale domain, because we do not manage those\".",
1244
+ "evidence": {
1245
+ "examples": [
1246
+ {
1247
+ "file": "modules/caddyhttp/autohttps.go",
1248
+ "line": 278,
1249
+ "snippet": ""
1250
+ },
1251
+ {
1252
+ "file": "caddyconfig/httpcaddyfile/tlsapp.go",
1253
+ "line": 271,
1254
+ "snippet": ""
1255
+ },
1256
+ {
1257
+ "file": "modules/caddyhttp/routes.go",
1258
+ "line": 325,
1259
+ "snippet": ""
1260
+ }
1261
+ ]
1262
+ },
1263
+ "confidence": 0.7,
1264
+ "status": "auto"
1265
+ },
1266
+ {
1267
+ "id": "go.errors.gerund-wrap-panic-on-misuse",
1268
+ "scope": "personal",
1269
+ "language": "go",
1270
+ "category": "errors",
1271
+ "kind": "idiom",
1272
+ "text": "Wrap errors with fmt.Errorf using a lowercase gerund phrase for the failed step and %v: \"replacing listen address: %v\", \"parsing listener address: %v\". Panic with a plain concatenated string only for programmer misuse at registration time: panic(\"network type \" + network + \" is already registered\").",
1273
+ "evidence": {
1274
+ "examples": [
1275
+ {
1276
+ "file": "admin.go",
1277
+ "line": 1307,
1278
+ "snippet": ""
1279
+ },
1280
+ {
1281
+ "file": "listeners.go",
1282
+ "line": 701,
1283
+ "snippet": ""
1284
+ }
1285
+ ]
1286
+ },
1287
+ "confidence": 0.65,
1288
+ "status": "auto"
1289
+ },
1290
+ {
1291
+ "id": "go.naming.short-locals",
1292
+ "scope": "personal",
1293
+ "language": "go",
1294
+ "category": "naming",
1295
+ "kind": "voice",
1296
+ "text": "Use terse abbreviated names for narrow-scope locals and loop variables while keeping function names spelled out: `ap`, `subj`, `cs`, `rewr`, `repl`, `he`, `sb`.",
1297
+ "evidence": {
1298
+ "examples": [
1299
+ {
1300
+ "file": "caddyconfig/httpcaddyfile/tlsapp.go",
1301
+ "line": 669,
1302
+ "snippet": ""
1303
+ },
1304
+ {
1305
+ "file": "modules/caddytls/values.go",
1306
+ "line": 34,
1307
+ "snippet": ""
1308
+ },
1309
+ {
1310
+ "file": "modules/caddyhttp/rewrite/caddyfile.go",
1311
+ "line": 41,
1312
+ "snippet": ""
1313
+ }
1314
+ ]
1315
+ },
1316
+ "confidence": 0.7,
1317
+ "status": "auto"
1318
+ },
1319
+ {
1320
+ "id": "go.structure.function-scoped-const",
1321
+ "scope": "personal",
1322
+ "language": "go",
1323
+ "category": "structure",
1324
+ "kind": "idiom",
1325
+ "text": "Declare magic values as a `const` at the top of the function that uses them instead of at package level: `const idLen = 9`, `const tmpCh = 0xff`.",
1326
+ "evidence": {
1327
+ "examples": [
1328
+ {
1329
+ "file": "modules/caddyhttp/errors.go",
1330
+ "line": 32,
1331
+ "snippet": ""
1332
+ },
1333
+ {
1334
+ "file": "modules/caddyhttp/caddyhttp.go",
1335
+ "line": 251,
1336
+ "snippet": ""
1337
+ }
1338
+ ]
1339
+ },
1340
+ "confidence": 0.6,
1341
+ "status": "auto"
1342
+ },
1343
+ {
1344
+ "id": "go.layout.break-after-or",
1345
+ "scope": "personal",
1346
+ "language": "go",
1347
+ "category": "structure",
1348
+ "kind": "layout",
1349
+ "text": "Split long boolean conditions across lines with the `||` operator trailing at the end of each line and continuation lines indented one tab, both in `if` conditions and in `return` expressions.",
1350
+ "evidence": {
1351
+ "examples": [
1352
+ {
1353
+ "file": "listeners.go",
1354
+ "line": 701,
1355
+ "snippet": ""
1356
+ },
1357
+ {
1358
+ "file": "modules/caddyhttp/push/handler.go",
1359
+ "line": 222,
1360
+ "snippet": ""
1361
+ }
1362
+ ]
1363
+ },
1364
+ "confidence": 0.7,
1365
+ "status": "auto"
1366
+ }
1367
+ ]
1368
+ }