This document outlines the definition of file metrics for Rust.
The "complexity" metric counts:
if
andelse if
statementsfor ...
,while ...
andloop {...}
loops- match arms in match-statements:
match ... { <match arm value> => println!("Hello"), _ => println!("Hallo"), }
- or patterns in match arm:
|
- logical binary operations
&&
and||
- everything counted for the "functions" metric
The "functions" metric counts:
- method and function definitions:
fn ...
The "classes" metric counts:
- struct and trait definitions:
struct ...
,trait ...
It does not count:
- implementations on types:
impl ...
see README.md