trailing-whitespaces

Crates.iotrailing-whitespaces
lib.rstrailing-whitespaces
version0.5.0
created_at2025-05-21 10:42:22.257605+00
updated_at2025-09-17 06:58:07.547602+00
descriptionRemoves trailing whitespaces and trailing empty lines from text files
homepagehttps://gitlab.com/hsn10/trailing-whitespaces
repositoryhttps://gitlab.com/hsn10/trailing-whitespaces.git
max_upload_size
id1683230
size13,812
Radim Kolar (hsn10)

documentation

README

trailing-whitespaces

Crates.io Version Unlicense MSRV 1.59 Dependency status Safe Rust Lines of code Crates.io Downloads

Removes trailing whitespaces and trailing empty lines from text files.

Inspired by JavaScript npx tool https://github.com/o175/trailing-whitespaces#readme for removing trailing whitespace from lines in text files.

Usage

trailing-whitespaces [-v] glob ...

-v lists changed files

Difference from original tool

JavaScript version of trailing-whitespaces do not remove trailing empty lines like we do.

Glob patterns

Rust glob crate patterns are described here. They are slighly different from JavaScript fast-glob patterns which original JavaScript trailing-whitespaces tool uses.

Instead of

npx trailing-whitespaces ./src/**/.js

You need to run

trailing-whitespaces ./src/**/*.js

License

This is free and unencumbered software released into the public domain.

This code can be used under terms of CC0-1.0 or the Unlicense.

Unlicense logo

Commit count: 0

cargo fmt