https://github.com/azdavis/fix-ws
A fix for whitespace
https://github.com/azdavis/fix-ws
Last synced: about 2 months ago
JSON representation
A fix for whitespace
- Host: GitHub
- URL: https://github.com/azdavis/fix-ws
- Owner: azdavis
- License: mit
- Created: 2019-12-13T03:01:28.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T11:13:40.000Z (2 months ago)
- Last Synced: 2025-03-04T12:24:23.854Z (2 months ago)
- Language: Rust
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# fix-ws
Fixes whitespace by:
- Removing trailing whitespace.
- Ensuring there is exactly one LF at EOF.
- Removing all CR.
- Optionally converting indentation between tabs and spaces.## Usage
Fix whitespace in-place:
```
$ fix-ws foo.txt
```Fix whitespace, while also converting 2 spaces of indentation to a tab:
```
$ fix-ws -t 2 bar.js
```Fix whitespace, while also converting a tab of indentation to 4 spaces on many files at a time:
```
$ fix-ws -s 4 quz.rs main.rs
```## Development
Install [rust][], download the repo, enter it, and then:
```
$ cargo build
$ cargo test
```[rust]: https://rustup.rs