เพื่อให้เข้าใจฐานรหัสอย่างแท้จริงคุณจะต้องรู้ว่าหลวมหรือคู่กันแค่ไหนและเหมาะสมกับการเปลี่ยนแปลง
Codemetrix ทำให้มันเป็น jiffy ในการคำนวณ "ตัวชี้วัดการมีเพศสัมพันธ์":
อ่านเพิ่มเติมเกี่ยวกับเรื่องนี้ใน Wikipedia
นี่คือลักษณะของ Archfit ในแง่ของตัวชี้วัด

นอกจากนี้ยังจะช่วยให้คุณได้รับการมองข้ามแบบไดเรกทอรีของรหัสทั้งหมดในโครงการเปอร์เซ็นต์ที่ไดเรกทอรีใช้ฐานรหัสทั้งหมดของโครงการตัวชี้วัดที่รวมกัน (การมีเพศสัมพันธ์กับอวัยวะ/เอฟเฟกต์เป็นต้น) และยังเลือกไดเรกทอรีที่มีรายละเอียดเหล่านี้
{
"results" : [
{
"directoryPath" : " /src/application/services " ,
"afferent" : 2 ,
"efferent" : 21 ,
"abstractions" : 0 ,
"concretions" : 1 ,
"loc" : 260 ,
"percent" : 8.51
},
{
"directoryPath" : " /src/application/utils " ,
"afferent" : 3 ,
"efferent" : 2 ,
"abstractions" : 0 ,
"concretions" : 2 ,
"loc" : 52 ,
"percent" : 1.7
},
{
"directoryPath" : " /src/domain/fitness-functions " ,
"afferent" : 14 ,
"efferent" : 79 ,
"abstractions" : 7 ,
"concretions" : 23 ,
"loc" : 1181 ,
"percent" : 38.63
},
{
"directoryPath" : " /src/domain/services " ,
"afferent" : 2 ,
"efferent" : 28 ,
"abstractions" : 0 ,
"concretions" : 2 ,
"loc" : 275 ,
"percent" : 9
},
{
"directoryPath" : " /src/errors " ,
"afferent" : 9 ,
"efferent" : 0 ,
"abstractions" : 0 ,
"concretions" : 0 ,
"loc" : 109 ,
"percent" : 3.57
},
{
"directoryPath" : " /src " ,
"afferent" : 0 ,
"efferent" : 5 ,
"abstractions" : 0 ,
"concretions" : 2 ,
"loc" : 86 ,
"percent" : 2.81
},
{
"directoryPath" : " /src/infrastructure/aws " ,
"afferent" : 20 ,
"efferent" : 28 ,
"abstractions" : 0 ,
"concretions" : 15 ,
"loc" : 684 ,
"percent" : 22.37
},
{
"directoryPath" : " /src/infrastructure/utils/io " ,
"afferent" : 3 ,
"efferent" : 7 ,
"abstractions" : 0 ,
"concretions" : 3 ,
"loc" : 40 ,
"percent" : 1.31
},
{
"directoryPath" : " /src/infrastructure/utils/math " ,
"afferent" : 12 ,
"efferent" : 0 ,
"abstractions" : 0 ,
"concretions" : 3 ,
"loc" : 27 ,
"percent" : 0.88
},
{
"directoryPath" : " /src/infrastructure/utils/string " ,
"afferent" : 22 ,
"efferent" : 0 ,
"abstractions" : 0 ,
"concretions" : 2 ,
"loc" : 25 ,
"percent" : 0.82
},
{
"directoryPath" : " /src/infrastructure/utils/time " ,
"afferent" : 10 ,
"efferent" : 2 ,
"abstractions" : 0 ,
"concretions" : 9 ,
"loc" : 83 ,
"percent" : 2.72
},
{
"directoryPath" : " /src/interfaces " ,
"afferent" : 56 ,
"efferent" : 16 ,
"abstractions" : 12 ,
"concretions" : 0 ,
"loc" : 235 ,
"percent" : 7.69
}
],
"totalLinesOfCode" : 3057 ,
"loc" : " /src/domain/fitness-functions " ,
"afferent" : " /src/interfaces " ,
"efferent" : " /src/domain/fitness-functions " ,
"abstractions" : " /src/interfaces " ,
"concretions" : " /src/domain/fitness-functions "
}Codemetrix นั้นปราศจากการพึ่งพาทั้งหมดและมีน้ำหนักเบาสุด ๆ นอกจากนี้ยังไม่มีการโทรจากระยะไกลหรืออะไรก็ตามที่เกิดขึ้นเพียงแค่การวิเคราะห์ไฟล์แบบคงที่เก่า ๆ
โปรดทราบด้วยว่าการใช้งานปัจจุบันมุ่งเน้นไปที่ TypeScript ทั้งหมด แต่ก็ไม่ควรขยายเพื่อสนับสนุนภาษาอื่น ๆ เช่นกัน เป็นแขกของฉันและมาพร้อมกับคำขอดึงหากคุณต้องการการสนับสนุนภาษาที่กว้างขึ้น!
Codemetrix ถือว่าคุณติดตั้งโหนดแล้วซึ่งเป็นเวอร์ชันใหม่กว่า
ในการสร้างและทดสอบรหัสคุณจะต้องมีโหนด 19 หรือใหม่กว่า
คุณ สามารถ ดาวน์โหลดไฟล์คอมไพล์ dist/index.mjs และ codemetrix.sh และทำตามคำแนะนำด้านล่าง นี่เป็นสิ่งที่ดีถ้าคุณไม่ใหญ่ใน Git
แต่ตัวเลือกที่ดีกว่าคือการโคลน repo นี้และใช้สคริปต์ install.sh
มันจะ:
.codemetrixcodemetrix.sh และ dist/index.mjs ไปยังไดเรกทอรีใหม่.zshrc ของคุณด้วยนามแฝง ( codemetrix ) ที่เรียกใช้สคริปต์อย่าลังเลที่จะแก้ไขสคริปต์การติดตั้งหรือทำในแบบของคุณหากสิ่งนี้ไม่ตรงกับวิธีที่คุณต้องการให้ตั้งค่า
คุณจะต้องจัดหาหรือโหลด IDE ใหม่เพื่อให้การเปลี่ยนแปลงเปิดใช้งาน
เรียกใช้ codemetrix ในที่เก็บ Git มันจะถือว่าซอร์สโค้ดอยู่ในไดเรกทอรี src
หากต้องการจัดหาด้วยไดเรกทอรีอื่นให้เรียกใช้ codemetrix YOUR_DIRECTORY
มีการสนับสนุนโดยเฉพาะ MD แต่โดยทั่วไปฉันยินดีที่จะรับคำแนะนำและข้อเสนอสำหรับคุณสมบัติใหม่!