A high-performance tool for fixing line endings. It recursively scans directories and adds missing newlines to the end of text files.
- Ultra-fast: Achieves high-speed processing through parallel execution and minimal I/O
- Smart filtering: Automatic binary file detection based on file extensions
- Safe: Automatically skips binary files
- Efficient: Efficient parallel processing using the Sourcegraph conc library
go install github.com/upamune/eolfmt/cmd/eolfmt@latestOr build from source:
git clone https://github.com/upamune/eolfmt.git
cd eolfmt
go build -o eolfmt ./cmd/eolfmt# Process all files in the current directory
eolfmt
# Process specific directories
eolfmt /path/to/directory
# Process multiple paths
eolfmt src/ docs/ tests/
# Show version information
eolfmt -version.gitnode_modules.ideatargetbuilddistvendor__pycache__
- Executables:
.exe,.dll,.so,.dylib - Images:
.png,.jpg,.jpeg,.gif - Archives:
.pdf,.zip,.tar,.gz - Compiled:
.pyc,.class,.jar
| Project Size | File Count | Processing Time |
|---|---|---|
| Small | 1,000 | < 0.5s |
| Medium | 10,000 | < 2s |
| Large | 100,000 | < 15s |
# Install dependencies
go mod download
# Build
make build
# Run tests
make test
# Static analysis (revive)
make lint
# Run all checks
make check- Hard link support: The tool does not currently handle hard links specially. When processing hard-linked files, changes will affect all linked instances.
MIT
