pub enum FileTypeScope {
Metrics,
All,
Custom(Vec<String>),
}vcs-git only.Expand description
Which tracked files the change-history walk ranks (issue #576).
Applied as an additional extension-only filter on top of the
--paths / --include / --exclude globs (AND semantics): a file
must pass both to be ranked. The check never reads blob content, so a
language detected only by an in-file modeline (Emacs / Vim) — never by
its extension — is treated as out-of-scope under Metrics;
this is the one documented divergence from the content-aware bca metrics walk.
Variants§
Metrics
Only files bca computes metrics for — the same set bca metrics
would analyze, resolved by extension via
get_language_for_file. The
default: it keeps the change-history ranking aligned with the AST
hotspot tables (which only cover files-with-metrics) and keeps
high-churn non-source files (CHANGELOG.md, Cargo.lock, CI
config) out of the risk ranking. Extension-less files
(Makefile, Dockerfile, LICENSE) and unknown extensions are
excluded.
All
Every tracked, non-binary, non-symlink text file — the behaviour
before the metrics default was introduced.
Custom(Vec<String>)
A user-supplied allow-list of file extensions, normalised to
lowercase with any leading dot stripped (rs, py, toml). A
file is in scope iff its lowercased extension is in the list.
Implementations§
Trait Implementations§
Source§impl Clone for FileTypeScope
impl Clone for FileTypeScope
Source§fn clone(&self) -> FileTypeScope
fn clone(&self) -> FileTypeScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileTypeScope
impl Debug for FileTypeScope
Source§impl Default for FileTypeScope
impl Default for FileTypeScope
Source§fn default() -> FileTypeScope
fn default() -> FileTypeScope
impl Eq for FileTypeScope
Source§impl FromStr for FileTypeScope
impl FromStr for FileTypeScope
Source§impl PartialEq for FileTypeScope
impl PartialEq for FileTypeScope
impl StructuralPartialEq for FileTypeScope
Auto Trait Implementations§
impl Freeze for FileTypeScope
impl RefUnwindSafe for FileTypeScope
impl Send for FileTypeScope
impl Sync for FileTypeScope
impl Unpin for FileTypeScope
impl UnsafeUnpin for FileTypeScope
impl UnwindSafe for FileTypeScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.