Skip to content

Trim trailing whitespace #911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

cqcallaw
Copy link
Contributor

No code changes here, just a quality-of-life edit per #903. I simply ran the following command:

find * -type f -exec sed -i 's/[ \t]*$//' "{}" \;

No code changes here, just a quality-of-life edit per htacg#903
@geoffmcl
Copy link
Contributor

@cqcallaw thank you for this PR... and the recent update to clear merge conflicts...

I am afraid I really can't fully explain why I hesitate on this...

It is something to do with my workflow... when chasing down a bug, I often do code diffs to previous, old, code, to explore, understand, get clues, etc, etc... Yes, I know diff has a -bB options to ignore spaces and blank line, but that does not feel the same... somehow I feel I might lose something, since as pointed out many of the trailing space do come from quite old code... perhaps not very rational...

Maybe we could split it up into two parts - one for the code, *.c|h, and one for the other docs, which I am not so concerned about... or something...

But I am 49:51, so not all against... it does nearly seem a good thing... I think!

Maybe, with some more time, I will come around... please bear with me... feedback welcome... thanks...

@cqcallaw
Copy link
Contributor Author

cqcallaw commented Dec 2, 2020

Philosophically, I like keeping the source code tidy, since tidiness is the project's raison d'être, but I've seen enough code to respect a maintainer's intuition.

The whitespace does present a challenge to me as a contributor, as I have to toggle a setting in my editing environment (Visual Studio Code) when I switch projects; the per-project setting seems to be broken. Breaking your workflows probably does more harm to the project than breaking mine, though.

@geoffmcl
Copy link
Contributor

@cqcallaw, sorry, but this PR gives me the heebie geebies ;=() It has some positive attributes, but...

But, in fact, for some reason, hinders me working on other parts of Tidy, maybe more important than the normally, invisible, do nothing, trailing space...

Asside from my workflow concerns mentioned, maybe there are cases where a trailing 2 spaces is significant as in *.md docs. Need to check for those...

But also really do not want to send the message that tidy main repo is 100% trailing space intolerant... And, not that it really matters, find quite a number of other FOSS repos likewise inclined...

Like historically, tidy is, with tabs in code... even has a tool tab2space... which I also never quite understood...

Of course, we also do not want to imply that anything goes... but that should be dealt with on a case by case basis...

Also reject the raison d'être argument. The tidy in tidy is about pretty printing HTML code, not 'C' code, and other text documents...

On the whole, still remain 49:51, so closing this all-in-one PR for now... sorry... and sorry if it breaks your editor workflow...

As suggested, if there are any particularly bad cases, then these shoud be dealt with separately...

Further comments and feedback welcome... maybe I am missing something... thanks...

@geoffmcl geoffmcl closed this Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants