strictly typed rate of some well-known Golang projects
Ray-Eldath opened this issue · comments
Ray Eldath commented
pingcap/tidb (71638ee
):
root@IDC-172-16-6-59 /d/tidb (master) [2]# fish COMMAND
Among your codebase, there are...
31988 parameters declared in functions, 273 of them are evil! (98.78% typed)
20504 values returned from functions, 251 of them are evil! (98.78% typed)
11930 fields declared in structs, 368 of them are evil! (96.92% typed)
11131 values declared, 37 of them are evil! (99.67% typed)
472 type aliases introduced, 1 of them are evil! (99.79% typed)
Overall, 98.78% of your types are strictly typed (not interface{}).
Ray Eldath commented
google/wire (d07cde0
):
root@IDC-172-16-6-59 /d/wire (main)# bash COMMANDS
Among your codebase, there are...
253 parameters declared in functions, 20 of them are evil! (98.81% typed)
168 values returned from functions, 2 of them are evil! (98.81% typed)
123 fields declared in structs, 1 of them are evil! (99.19% typed)
32 values declared, 0 of them are evil! (100.00% typed)
7 type aliases introduced, 0 of them are evil! (100.00% typed)
Overall, 96.05% of your types are strictly typed (not interface{}).
Ray Eldath commented
spf13/cobra (56060d1
):
root@IDC-172-16-6-59 /d/cobra (master)# bash COMMANDS
Among your codebase, there are...
799 parameters declared in functions, 13 of them are evil! (100.00% typed)
302 values returned from functions, 0 of them are evil! (100.00% typed)
120 fields declared in structs, 0 of them are evil! (100.00% typed)
124 values declared, 0 of them are evil! (100.00% typed)
5 type aliases introduced, 0 of them are evil! (100.00% typed)
Overall, 99.04% of your types are strictly typed (not interface{}).