Skip to content
This documentation applies to Codacy Self-hosted v4.0.1

For the latest updates and improvements, see the latest Cloud documentation instead.

How does Codacy measure complexity in my repository?#

Codacy uses cyclomatic complexity to identify complex files in your repository.

Cyclomatic complexity is a software metric used to indicate the complexity of a program. It's a quantitative measure of the number of linearly independent paths through a program's source code.

A complex file is a file with a complexity value bigger than the threshold defined on the repository quality settings.

Code complexity is calculated based on the maximum number of complex methods in a file.

In your Repository Dashboard you can see how complexity is evolving for your repository.

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?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact support@codacy.com.

Last modified February 11, 2021