4 ms·
It's common practice to run tools to calculate complexity as a CI (continuous integration) task. For example, at the company I work for, we check code complexi
by mikegerwitz 11y ago
It's common practice to run tools to calculate complexity as a CI (continuous integration) task.
For example, at the company I work for, we check code complexity every time someone pushes to certain branches in our repositories, and mark the build as unstable if the score is too high. In that case, the only acceptable solution is refactoring; all builds must be stable before the task associated with the change can be considered complete.
It's not reasonable to run it once a month or longer---by then we've moved on, context and focus have been lost, and refactoring is considerably more expensive (both for development and because it has to go back through QA) than if it were done immediately.
- fapjacks 11y agoHuh, that's pretty cool. Do you have any links to more information? Ideally a write-up/blog post about your environment and how you achieve this?
- rkv 11y agoNot OP but we use Jenkins for our CI which has a plugin[1] which fails builds if a threshold is not met. [1] https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugi...
- mikegerwitz 11y agoYes, this is what we use as well.