Skip to main content

Crate codelens_core

Crate codelens_core 

Source
Expand description

§codelens-core

Core library for codelens - a high performance code statistics tool.

§Features

  • Fast parallel file traversal using ignore crate
  • Support for 70+ programming languages
  • Accurate line counting (code, comments, blanks)
  • Cyclomatic complexity analysis
  • Multiple output formats (Console, JSON, CSV, Markdown, HTML)
  • Respects .gitignore rules
  • Smart directory exclusion based on project type

§Example

use codelens_core::{analyze, Config};
use std::path::PathBuf;

let config = Config::default();
let paths = vec![PathBuf::from(".")];
let result = analyze(&paths, &config).unwrap();

println!("Total files: {}", result.summary.total_files);
println!("Total lines: {}", result.summary.lines.total);

Re-exports§

pub use analyzer::stats::AnalysisResult;
pub use analyzer::stats::Complexity;
pub use analyzer::stats::FileStats;
pub use analyzer::stats::LanguageSummary;
pub use analyzer::stats::LineStats;
pub use analyzer::stats::RepoStats;
pub use analyzer::stats::RepoSummary;
pub use analyzer::stats::SizeDistribution;
pub use analyzer::stats::Summary;
pub use config::Config;
pub use error::Error;
pub use error::Result;
pub use language::Language;
pub use language::LanguageRegistry;
pub use output::OutputFormat;
pub use output::OutputOptions;

Modules§

analyzer
Code analysis modules.
config
Configuration management.
error
Error types for codelens-core.
filter
File and directory filtering.
language
Language definition and detection.
output
Output format implementations.
walker
Directory traversal with parallel processing.

Functions§

analyze
Analyze code statistics for the given paths.