Repository navigation
v0.9.2
Cleaner.exe User Guide
Getting Started (simple)
Windows
- Place cleaner in
windows/system32orwindowsfolder, or add the path to the system PATH variable. - Open a command prompt and go to folder with source code and type
cleaner count. - Default settings will scan files in current folder and print result to console.
Linux
- Place cleaner in
/usr/local/bin/or/usr/bin/ - Open a command prompt and go to folder with source code and type
cleaner count. - Default settings will scan files in current folder and print result to console.
Overview
Cleaner.exe is a powerful utility for analyzing source code files. It counts lines, measures code sections (comments and strings), and presents detailed statistics in a tabular format with summary information.
Key Features
- Count total lines in source files
- Measure code, comments, and strings separately
- Generate character counts
- Process multiple files recursively
- Filter files based on custom criteria
- Export results in various formats
Usage
Basic Command Structure
cleaner.exe [global options] command [command options]
Global Options
| Option | Description |
|---|---|
--logging |
Turn on logging |
--logging-csv |
Add CSV logger for log information |
--print |
Print results from command |
--recursive [depth] |
Process directories recursively (specify depth) |
--database [folder] |
Set folder where logger places log files |
--statements [file] |
Specify file containing SQL statements |
Count Command
The primary command is count, which analyzes source files and provides statistics.
cleaner.exe count --source [filepath] [options]
Count Options
| Option | Description |
|---|---|
--source, -s |
File or directory to count lines in |
--comment [chars] |
Pair of characters marking start and end for comments |
--string [chars] |
Pair of characters marking start and end for strings |
--filter [pattern] |
Filter to use for file selection |
--recursive [depth] |
Specify recursion depth for directory traversal |
Example Usage
Count Lines in a Single File
cleaner.exe count --source myfile.cpp
Output Format
The output displays a table with the following columns:
| Column | Description |
|---|---|
| folder | Directory containing the file |
| filename | Name of the file |
| count | Total number of lines |
| code | Number of code lines (excluding comments and strings) |
| characters | Number of characters in code |
| comment | Number of comment blocks/lines |
| string | Number of string literals |