From the course: Agile Software Development: Code Quality

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adjust thresholds

Adjust thresholds - SonarQube Tutorial

From the course: Agile Software Development: Code Quality

Start my 1-month free trial

Adjust thresholds

- [Instructor] We've talked a bit about default threshold values. And I personally think that the defaults, in Code Climate, are really good ones. However, if these thresholds don't work for your team, then you need a way to change them. There's no way to do that from the web interface. Instead, we have to turn to a configuration file, CodeClimate.yml. Let's suppose that your team wants to use a value of 10 as the threshold for both cognitive complexity and cyclomatic complexity. Over in the django project, I have created a sample Code Climate configuration file, which does just that. It sets the method complexity, which is used for cognitive complexity, to 10. And for radon, it sets the threshold to C. You'll notice that the value for radon is a little strange. It turns out that radon has ranges that it uses. The A range is one to five, B is six to 10, and the C range is 11 to 20. So, by specifying our threshold as C, we're saying that we want an error of the cyclomatic complexity…

Contents