Trailing whitespace not working
See original GitHub issueI just installed pre-commit
, added this .pre-commit-config.yaml
file:
# See http://pre-commit.com for more information
# See http://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: v1.1.1
hooks:
- id: trailing-whitespace
and added a trailing space to a line in a file in the project, staged it, and when I commit it, it commits with the space, instead of removing it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
what is trailing whitespace and how can I handle this?
Trailing whitespace is any spaces or tabs after the last non-whitespace character on the line until the newline. In your posted question, there...
Read more >Why is trailing whitespace a big deal? [closed]
Trailing whitespace is enough of a problem for programmers that editors like Emacs have special functions that highlight it or get rid of...
Read more >Why isn't (sets-default show-trailing-whitespace t) working on ...
I am unable to get show-trailing-whitespace to work. Here is a test I did, emacs -q foo.txt. In Emacs I typed these commands,...
Read more >no-trailing-spaces - ESLint - Pluggable JavaScript Linter
This rule disallows trailing whitespace (spaces, tabs, and other Unicode whitespace characters) at the end of lines. Examples of incorrect code for this...
Read more >Remove Leading/Trailing Whitespace - R
x. a character vector. which. a character string specifying whether to remove both leading and trailing whitespace (default), or only leading ( "left"...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, this approach was taken as hooks can sometimes be wrong and it allows the human some chance to double check the machine.
Neither did I 😂 We go lucky I found it by mistake and fixed it easily, so others wouldn’t suffer.