Status Badges
Status badges let you display your project’s code coverage and maintainability metrics directly in your repository README. These badges update automatically as your metrics change, giving visitors an at-a-glance view of your code quality.
Available Badge Types
Qlty provides two types of status badges:
Code Coverage Badge
Displays your project’s code coverage percentage (0-100%).
Maintainability Badge
Displays your project’s maintainability rating as a letter grade (A, B, C, D, or F).
Getting Your Badge Code
The easiest way to get your badge embed code is through the Qlty UI:
- Go to your project on qlty.sh
- Navigate to Settings > Badges
- Select the badge type (Maintainability or Code Coverage)
- Choose the format (SVG or PNG)
- Select the embed format (Markdown, HTML, or RDOC)
- Click Copy to copy the code to your clipboard
- Paste the code into your README
Badge URL Format
Badges are available at these URLs:
By Project ID
By Workspace and Project
Both SVG (.svg) and PNG (.png) formats are supported.
Embedding Examples
Markdown
HTML
RDOC
Migrating from CodeClimate Badges
If you’re migrating from CodeClimate, replacing your badges is straightforward:
Step 1: Set Up Your Project on Qlty
Before you can use Qlty badges, ensure your project is configured:
- Add your project to qlty.sh
- For coverage badges, set up coverage reporting so Qlty receives your coverage data
Step 2: Get Your New Badge Code
- Go to your project’s Settings > Badges page
- Copy the badge code for each badge type you need
Step 3: Replace the Badges in Your README
Find your existing CodeClimate badges, which typically look like:
Replace them with the Qlty badge code you copied:
Step 4: Commit and Push
Commit your README changes and push to your repository. Your new Qlty badges will now display your current metrics.
Troubleshooting
Badge Shows “Unknown”
If your badge displays “unknown” instead of a value:
- For coverage badges: Ensure coverage data is being uploaded to Qlty. Check your CI pipeline and verify reports appear in Project Settings > Code Coverage.
- For maintainability badges: Ensure your project has been analyzed by Qlty at least once.
Badge Not Updating
Badges are cached for up to 10 minutes. If you’ve just uploaded new coverage data, wait a few minutes and refresh.
Badge Not Loading
- Verify your project ID is correct
- Check that the badge URL uses
https://(nothttp://) - For private projects, badges are only accessible to authenticated project members
See Also
- Coverage Metrics - Understand how coverage percentages are calculated
- Commit Statuses - Display coverage status on GitHub pull requests
- PR Comments - Add coverage reports to pull request comments