pretender 0.10.0

Multi-language structural code-quality checks — complexity, duplication, mutation testing, and CI integration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// expected_complexity: outer=2, inner=2

function outer(x) {
    function inner(y) {
        if (y > 0) {
            return y;
        } else {
            return -y;
        }
    }
    if (x > 0) {
        return inner(x);
    } else {
        return 0;
    }
}