mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH 1/2] tools: Add a script to remove trailing spaces
@ 2022-05-03 15:56 Jules Maselbas
  2022-05-03 15:56 ` [musl] [PATCH 2/2] Remove trailing whitespaces tree-wide Jules Maselbas
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jules Maselbas @ 2022-05-03 15:56 UTC (permalink / raw)
  To: musl; +Cc: Jules Maselbas

Add the remove-trailing-space.sh script, it will only consider files
tracked by git. Optionaly accept arguments to select the affected path.

Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
---
 tools/remove-trailing-space.sh | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100755 tools/remove-trailing-space.sh

diff --git a/tools/remove-trailing-space.sh b/tools/remove-trailing-space.sh
new file mode 100755
index 00000000..a8b0056a
--- /dev/null
+++ b/tools/remove-trailing-space.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+git grep  '[[:space:]]$' -- $@ | sed 's/:.*//' | uniq | xargs sed -i 's/[[:space:]]\+$//'
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-04  8:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 15:56 [musl] [PATCH 1/2] tools: Add a script to remove trailing spaces Jules Maselbas
2022-05-03 15:56 ` [musl] [PATCH 2/2] Remove trailing whitespaces tree-wide Jules Maselbas
2022-05-03 16:17   ` Jeffrey Walton
2022-05-03 17:14     ` Rich Felker
2022-05-03 16:29   ` Khem Raj
2022-05-03 16:30 ` [musl] [PATCH 1/2] tools: Add a script to remove trailing spaces Khem Raj
2022-05-04  6:06 ` Patrick Oppenlander
2022-05-04  8:20   ` Jules Maselbas

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).