Skip to main content

Metrics and scores reference

Understand the terminology used by GitHub to assess the quality of your repository's code.

This article provides definitions for the metrics and scores used by Code Quality.

You can see the rule-based results for your repository on your Security and quality tab, in the Standard findings tab under " Code quality".

Metric definitions

The following table provides definitions for each metric that is reported for your repository.

MetricDefinitionExample findings
ReliabilityAssess whether the code performs its intended function correctly, predictably, and consistently. Reliable code is free from bugs, handles errors safely, and operates as expected under normal and edge-case conditions.Issues with performance, concurrency, error handling, correctness
MaintainabilityAssess how easy it is to understand, modify, and extend the code over time. Maintainable code follows best practices, avoids unnecessary complexity, and is organized for ease of future changes and collaboration.Unused/dead code, readability, complexity, conflicting naming, poor separation of concerns

Severity levels

Severity levels are used to indicate the potential impact or urgency of a code quality finding. They help users prioritize remediation efforts and communicate risks to stakeholders. Severity is determined by the rule that detected the issue, following conventions from CodeQL and industry standards.

SeverityDefinition
ErrorIndicates a high-severity issue that is likely to cause bugs, failures, or major maintainability risks.
WarningIndicates a moderate-severity issue that may impact code quality or reliability, but is not immediately critical.
NoteIndicates a low-severity issue, minor improvement, or recommendation. These findings are useful for ongoing code health and maintainability.

Scores definitions

These scores are used to summarize the overall reliability and maintainability of a repository based on the severity of rule-based results found by CodeQL scans of the full default branch:

ScoresDefinitionCriteria (based on findings)
ExcellentCodebase demonstrates best practices for reliability and maintainability.No code quality findings detected
GoodCodebase has low-severity issues or minor improvements are suggested.≥1 "Note" level finding
FairCodebase has moderate-severity issues that may impact quality, but are not critical.≥1 "Warning" level finding
PoorCodebase has high-severity issues, including bugs or major maintainability risks.≥1 "Error" level finding

Code coverage

For details about how Code Quality measures and reports code coverage, see Code coverage reference.

Further reading