Count lines of code excluding #[cfg(test)]

Hi,

I'm looking for a way to count the lines of code in a project excluding test-related code, i.e., code attributed with #[cfg(test)].

How would I do that?