I am of the opinion that test code in source files (e.g., in Rust, code in #[cfg(test)] blocks) should not count towards a project's LOC, but tokei doesn't seem to support excluding such code from its counts. I therefore request a feature like one of the following:
An option for explicitly excluding test code (using built-in per-language rules) from the final count
An option/options for excluding line ranges from consideration using regexes, e.g., --exclude-line-start "^#\[cfg\(test\)\]" --exclude-line-end "^\}"
Related issue: #948 (Seems to be more about adding a separate count for test code)
I am of the opinion that test code in source files (e.g., in Rust, code in
#[cfg(test)]
blocks) should not count towards a project's LOC, but tokei doesn't seem to support excluding such code from its counts. I therefore request a feature like one of the following:An option for explicitly excluding test code (using built-in per-language rules) from the final count
An option/options for excluding line ranges from consideration using regexes, e.g.,
--exclude-line-start "^#\[cfg\(test\)\]" --exclude-line-end "^\}"
Related issue: #948 (Seems to be more about adding a separate count for test code)