Code Quality Metrics

Code Lines/Comment Ratio/Complexity Analysis

Code Quality Metrics Explanation

Metric Definitions

  • Code Lines — Actual code lines, excluding blanks and comments
  • Comment Ratio — Comments vs total code lines, recommended ≥ 20%
  • Cyclomatic Complexity — Number of program branch paths, lower is better (≤10 ideal)
  • Avg Function Length — Average code lines per function, recommended ≤ 30

Supported Languages

  • JavaScript / TypeScript (//, /* */)
  • Python (#, ''', \"\"\")
  • Java / C / C++ / Go / Rust (//, /* */)
  • HTML (<!-- -->), CSS (/* */)