Skip to main content

Crate sloc_core

Crate sloc_core 

Source

Re-exports§

pub use baseline::BaselineEntry;
pub use baseline::BaselineStore;
pub use baseline::check_against_baseline;
pub use baseline::resolve_baselines_path;
pub use coverage::FileCoverage;
pub use coverage::aggregate_line_coverage;
pub use coverage::lookup_coverage;
pub use coverage::parse_lcov;
pub use delta::FileChangeStatus;
pub use delta::FileDelta;
pub use delta::MultiFileDelta;
pub use delta::MultiScanComparison;
pub use delta::MultiScanPoint;
pub use delta::ScanComparison;
pub use delta::SummaryDelta;
pub use delta::compute_delta;
pub use delta::compute_multi_delta;
pub use history::CleanupPolicy;
pub use history::CleanupPolicyStore;
pub use history::RegistryEntry;
pub use history::ScanRegistry;
pub use history::ScanSummarySnapshot;
pub use history::WatchedDirsStore;
pub use maintenance::PrunePlan;
pub use maintenance::PruneReport;
pub use maintenance::PrunedRun;
pub use maintenance::copy_tree;
pub use maintenance::dir_size_bytes;
pub use maintenance::execute_run_prune;
pub use maintenance::plan_run_prune;
pub use maintenance::resolve_output_root;
pub use maintenance::resolve_registry_path;
pub use maintenance::rotate_log;
pub use maintenance::rotated_log_paths;
pub use maintenance::run_output_dir;

Modules§

baseline
Named baseline snapshots — save a scan result as a pinned reference point and compare future scans against it.
coverage
delta
history
maintenance
Disk-hygiene primitives for reclaiming space taken by old scan artifacts and log files.

Structs§

AnalysisRun
Author
A resolved contributor: one human, possibly spanning several raw git identities that were auto-merged because they share a normalized email. Cross-email merges (corporate login vs. full name vs. last name) are a follow-up interactive step; Phase 1 only auto-merges the high-confidence same-email case, which is always safe.
AuthorLineCounts
Line tallies bucketed the same three ways as LineCategory. total_lines is the sum of the three category counts (i.e. physical lines owned).
AuthorMergeGroup
One operator-defined merge: several email identities that are actually one person.
CocomoEstimate
COCOMO I (Basic) cost-estimation result derived from total code SLOC.
EffectiveCounts
EnvironmentMetadata
FileOwnership
One author’s ownership of a single file. author_id indexes into AnalysisRun::authors.
FileRecord
IdentityMap
A persisted collection of AuthorMergeGroups. Applied to a run’s authors at display time.
LanguageStyleGroup
Per-language-family style aggregation within a StyleSummary.
LanguageSummary
ProgressCounters
Atomics shared between analyze() and the caller so the caller can poll scan progress.
RawIdentity
A raw (name, email) pair exactly as recorded in git history (post-.mailmap). Multiple raw identities can be folded into one Author when they share a normalized email.
RepositoryLayout
Summary of the git-repository shape under a selected scan root.
StyleSummary
Aggregate multi-language style-guide adherence across all analysed files.
SubmoduleSummary
Per-submodule aggregated stats produced when submodule_breakdown is enabled.
SummaryTotals
ToolMetadata

Enums§

CocomoMode
COCOMO I (Basic) project mode — determines the a/b/c/d exponent coefficients.
FileStatus

Functions§

analyze
Errors
apply_identity_map
Fold a run’s authors according to map, in place: contributors whose email belongs to the same merge group are combined (counts summed, aliases merged, per-file ownership remapped and re-aggregated). Authors are re-sorted by code lines owned and re-indexed. A no-op when the map is empty or the run has no authors.
detect_repository_layout
Inspect root for independent git repositories nested beneath it.
detect_submodules
Parse .gitmodules in root and return (name, relative_path) for each submodule found.
read_json
Errors
write_json
Errors

Type Aliases§

CppStyleSummary
Backward-compatible alias kept so that sloc-report and sloc-web can migrate incrementally without a breaking change on the same release.