I am not sure whether this question is suited for SO or not. I will delete if it is not.
I have to review a few KLOC of code. As a part of it I have to find out the depth of loops and condition checking. [Please see the examples below]
If it is more than five means I need to note it down.
My question is "Is there any tool that could do this for me?" I did searching the google, but did not get an answer.
Ex 1 : for {}
// Block depth 1
Ex 2 : for { if () {} }
// Block depth 2
Ex 3 : for () { for () { if() {} } }
//Block depth 3