https://github.com/josephtlyons/lineman
Clean up the lines of files in your code repository
https://github.com/josephtlyons/lineman
Last synced: about 2 months ago
JSON representation
Clean up the lines of files in your code repository
- Host: GitHub
- URL: https://github.com/josephtlyons/lineman
- Owner: JosephTLyons
- License: gpl-3.0
- Created: 2021-10-24T23:32:37.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-28T18:05:39.000Z (4 months ago)
- Last Synced: 2025-04-22T16:18:38.593Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 37.1 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# lineman
Clean up the lines of files in your code repository
**NOTE**: While lineman does have tests in place to ensure it operates in a
specific way, I still caution any user to only use lineman on version-controlled
repositories, so that, in the event of some catastrophic failure, file changes
can be reverted.---
Lineman currently performs two actions:
1. Strips trailing whitespace in every line in a file
2. Normalizes the newline count at the end of a file to oneThe following command would run lineman on every rust and python file within the
`/path/to/some/repository` directory.```shell
cargo run -- -p /path/to/some/repository -e rs py
```Currently, there is a flag that will disable the end-of-file newline
normalization: `disable_eof_newline_normalization` or `d````shell
cargo run -- -p /path/to/some/repository -e rs py -d
```The tests at the end of [main.rs](src/main.rs) show how lineman transforms a
file's content