sourceatlas-0.2.0 is not a library.
SourceAtlas
SourceAtlas is a command-line tool written in Rust that scans a source code repository and generates useful statistics.
I started this project as a way to learn Rust by building something practical instead of only completing exercises. The goal isn't to compete with existing tools, but to build a clean, well-structured application while learning more about idiomatic Rust and software engineering.
Features
Current features include:
- Recursive directory scanning
- Ignores common build and IDE directories:
targetbuildnode_modules.idea.vscode
- Reports:
- Directories scanned
- Files scanned
- Files analyzed
- Files skipped
- Total lines
- Blank lines
- Non-blank lines
- Characters
- Functions (currently Rust only)
- TODO comments
- Gracefully skips unreadable or binary files
- Unit tested
Installation
Install from crates.io:
Or build from source:
Usage
Scan the current directory:
Scan another directory:
Example Output
-------------
|SourceAtlas|
-------------
Scanning Git repo
LANGUAGE STATS
Rust: 100.0%
- Files: 14
- Lines: 728
- Blank lines: 117
- Non-blank lines: 611
- Characters: 14359
- Functions: 39
- TODOs: 2
DIRECTORIES
--------
total directories: 5
TOTALS
--------
total files found: 20
total files analyzed: 14
total files skipped: 6
total lines: 728
total characters: 14359
total non-blank lines: 611
total blank lines: 117
total functions: 39
total TODO's: 2
The above output is generated when running sourceatlas on itself
Roadmap
Some features I'd like to add:
- More visually appealing report generation
- Support for more languages
- Custom ignore files
- JSON output
- Markdown reports
- Better language detection
- Parallel directory scanning
- Additional repository metrics
License
This project is licensed under the MIT License.