The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com
mixed tabs/spaces, trailing whitespace, and inconsistent formatting
|Assignee:||Ian Taylor||% Done:|
|Keywords:||Affected Facter version:|
Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com
This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.
Here is a patch which fixes all, or most formatting inconsistencies in facter.
I know it’s a large patch. I tried to make it simple to ensure that I only did whitespace modification. After applying with git, you can do a @git diff -w@ to see the non-whitespace differences. There should only be a few additions/subtractions of newlines.
#1 Updated by Luke Kanies about 5 years ago
- Status changed from Unreviewed to Code Insufficient
I like the idea of making the whole project consistent, but… both Puppet and Facter are four-space projects so far, and this patch changes Facter to be two-space.
At the least, I don’t want to make this change without consultation with the list, and, really, I’m not a big fan of 2 space.
What do others think?
#5 Updated by Luke Kanies about 5 years ago
Fwiw, most Ruby code I have seen, including what ships with Ruby itself (stdlib, etc.) uses 2 spaces, not 4.
That’s true, but Puppet is older than the majority of Ruby projects, and the whole two-space trend didn’t start until I already had a ton of code.
#8 Updated by Ian Taylor about 5 years ago
Okay, here is a new patch.
It makes indentation and alignment more consistent (no tabs, and indentation of 4 spaces) and removes trailing whitespace.
#9 Updated by Luke Kanies about 5 years ago
- Assignee set to Ian Taylor
The patch doesn’t apply cleanly against the current HEAD:
luke@phage $ git am ~/Desktop/0001-more-consistent-indentation-and-alignment.-also-remo.patch Applying: more consistent indentation and alignment. also removal of trailing whitespace /Users/luke/git/facter/.git/rebase-apply/patch:366: trailing whitespace. /Users/luke/git/facter/.git/rebase-apply/patch:1394: trailing whitespace. end /Users/luke/git/facter/.git/rebase-apply/patch:1471: trailing whitespace. end error: patch failed: lib/facter.rb:28 error: lib/facter.rb: patch does not apply Patch failed at 0001. When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [master ~/git/facter] luke@phage $
If I knew git better, I could try to fix it, but… I don’t know to even figure out where the problem is, much less how to fix it.
If you can rebase and republish, I’ll get it applied immediately.
#10 Updated by Ian Taylor about 5 years ago
Not sure what happened. Submitting new patch.