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

fn outer(x: i32) -> i32 {
    fn inner(y: i32) -> i32 {
        if y > 0 {
            y
        } else {
            -y
        }
    }
    if x > 0 {
        inner(x)
    } else {
        0
    }
}