For the latest updates and improvements in production, open docs.codacy.com instead.
Adding a Codacy badge#
Add a Codacy badge to the README of your repository to display the current code quality grade or code coverage of your repository.
To obtain your Codacy badge, open your repository Settings, tab General, select the markup language, and copy the generated code to your README file. You can also add a badge for your coverage if you have set up code coverage for your repository.
To display the grade or code coverage information of a different branch analyzed by Codacy, append ?branch=<branch_name>
to the URL of the badge. For example:
https://app.codacy.com/project/badge/Grade/cba8fd0874ac4f569f4f880e473cbac9?branch=dev
Fixing your Codacy badge#
The Codacy badges for your repository may become unavailable or grayed out if the analysis or code coverage information for the last commit isn't available, or if you renamed or re-added your repository on Codacy:
To fix each badge:
- Reanalyze the branch associated with the code quality badge
- Make sure that you're generating and uploading code coverage reports for all the commits in the branch associated with the coverage badge
If these steps don't fix your Codacy badges it can mean that the badges are no longer valid. In this case, repeat the steps above to replace the existing badges with new ones.
Share your feedback 📢
Did this page help you?
Thanks for the feedback! Is there anything else you'd like to tell us about this page?
255 characters left
We're sorry to hear that. Please let us know what we can improve:
255 characters left
Alternatively, you can create a more detailed issue on our GitHub repository.
Thanks for helping improve the Codacy documentation.
Edit this page on GitHub if you notice something wrong or missing.
If you have a question or need help please contact support@codacy.com.