You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just want to suggest an addition to this very nice project. I would find it useful if onefetch had an option to filter out directories and/or files when calculating stats like Languages, LoC and Size.
I find that current results are quite skewed for projects that include many submodules or other code dependencies. An exclusion pattern would allow ignoring things like third-party code, documentation, examples, etc. I imagine something like --exclude <pattern>.
Alternatively (or additionally), there could be an option to discount git submodules. That would be easier to use, but less general.
The text was updated successfully, but these errors were encountered:
Yes, the --exclude <pattern> flag would be a nice addition to the tool. tokei (used by onefetch to retrieve language statistics) already has this feature. So we "just" need to use it (from lib.rs):
// Exclude any path that contains any of these strings.
let excluded = &["target"];
let config = Config::default();
let mut languages = Languages::new();
languages.get_statistics(paths, excluded, &config);
let rust = &languages[&LanguageType::Rust];
Doing so, Languages and LoC sections will be updated based on the flag's input. However the Size will remain unchanged as it relies on a git command and not tokei.
Just want to suggest an addition to this very nice project. I would find it useful if onefetch had an option to filter out directories and/or files when calculating stats like Languages, LoC and Size.
I find that current results are quite skewed for projects that include many submodules or other code dependencies. An exclusion pattern would allow ignoring things like third-party code, documentation, examples, etc. I imagine something like
--exclude <pattern>
.Alternatively (or additionally), there could be an option to discount git submodules. That would be easier to use, but less general.
The text was updated successfully, but these errors were encountered: