subamanis / mezura

A fairly fast, fairly accurate and very customizable stats generator and growth tracker, for programming projects, in the form of a CLI executable, written in Rust.
MIT License
6 stars 1 forks source link

Respect .ignore files #3

Open vincentdephily opened 3 years ago

vincentdephily commented 3 years ago

Without this, depending on your project structure, you're going to mostly measure dependencies and generated code. Which can be useful sometimes but should not be the default. Se tokei's --no-ignore-* flags for inspiration. I know mezura has --exclude, but it isn't as convenient and featureful. There are crates to parse various ignore files.

subamanis commented 3 years ago

The "problem" with adding such functionality is that mezura doesn't support pattern matching for paths, extensions, etc. that can be found in .ignore files, like tokei does. This would be a nice addition at some point.

Right now, mentioning specific folders with --dirs and adding --exclude if necessary is your best bet. It has to be done once, and after that, it can be saved and loaded as a configuration.