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