Skip to content

Conversation

@promag
Copy link
Contributor

@promag promag commented Jul 24, 2018

The script test/lint/lint-whitespace.sh should prevent new cases.

This happens in some pulls where the code editor and the author 'git add's them, so this would fix it all.

@Sjors
Copy link
Member

Sjors commented Jul 24, 2018

Ironically rejected by a linter :-)

Concept ACK: means I can turn "remove trailing whitespace" on again in my editor, without it changing stuff all over the file.

@promag promag force-pushed the remove-trailing-whitespaces branch from b32fa1a to b3ce595 Compare July 24, 2018 15:21
@promag
Copy link
Contributor Author

promag commented Jul 24, 2018

means I can turn "remove trailing whitespace" on again in my editor, without it changing stuff all over the file

Right, or skip hunks. Or this #13248 (comment).

@maflcko
Copy link
Member

maflcko commented Jul 24, 2018

ACK b3ce5956291cd25ddb654e1dfb543658f87cdeb1, any difference between [[:space:]][[:space:]]* and [[:space:]]+?

@promag promag force-pushed the remove-trailing-whitespaces branch from b3ce595 to 2ffcfc6 Compare July 24, 2018 16:01
@promag
Copy link
Contributor Author

promag commented Jul 24, 2018

@MarcoFalke in order to use + extended regular expressions must be used. Updated to use them.

@maflcko
Copy link
Member

maflcko commented Jul 24, 2018

Note that the flag for gnu sed is --regexp-extended, not -E and for git it is --extended-regexp :p

@promag promag force-pushed the remove-trailing-whitespaces branch from 2ffcfc6 to 93538be Compare July 24, 2018 16:08
@maflcko
Copy link
Member

maflcko commented Jul 24, 2018

You'd have to remove the trailing '' after the -i option, no?

-BEGIN VERIFY SCRIPT-

sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test  ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue')

-END VERIFY SCRIPT-
@promag promag force-pushed the remove-trailing-whitespaces branch from 93538be to 12dd101 Compare July 24, 2018 19:50
@promag
Copy link
Contributor Author

promag commented Jul 24, 2018

@MarcoFalke done :feelsgood:

@mess110
Copy link
Contributor

mess110 commented Jul 24, 2018

utACK 12dd101

@maflcko
Copy link
Member

maflcko commented Jul 24, 2018

utACK 12dd101

@DrahtBot
Copy link
Contributor

Note to reviewers: This pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@fanquake
Copy link
Member

utACK 12dd101

Have not checked the scripted diff or if this is has removed all the trailing whitespace, but if according to @DrahtBot this doesn't disrupt much else, LJGTM.

@maflcko maflcko merged commit 12dd101 into bitcoin:master Jul 25, 2018
maflcko pushed a commit that referenced this pull request Jul 25, 2018
12dd101 scripted-diff: Remove trailing whitespaces (João Barbosa)

Pull request description:

  The script test/lint/lint-whitespace.sh should prevent new cases.

  This happens in some pulls where the code editor and the author 'git add's them, so this would fix it all.

Tree-SHA512: bcdd3472fcd01a2754e52212c7db1de2fdc422728b06785481954a27162fb72001cb73708329cc56e95bcc5e45c1348ebc4eacc2ccfa6aa12413c7ec450b6a33
@Empact
Copy link
Contributor

Empact commented Jul 25, 2018

So glad this is done. Thanks @promag!

PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Jul 29, 2020
-BEGIN VERIFY SCRIPT-

sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test  ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue')

-END VERIFY SCRIPT-

Signed-off-by: pasta <[email protected]>
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants