Understand RubyCritic core metrics
mainRubyCritic provides a quality report by wrapping static analysis gems like Reek, Flay, and Flog. It calculates four key metrics to help you judge the 'odorousness' of your Ruby code:
- Score: A value from 0 to 100 representing overall code quality (higher is better).
- Churn: The number of times a file has been committed.
- Complexity: The amount of 'pain' in the code, calculated using Flog's ABC (Assignments, Branches, Calls) metric.
- Rating: A letter grade from
A(best) toF(worst) assigned to each file. - Cost: A non-negative number where higher values indicate worse code smells. This value is used to determine the Rating and the overall Score.