Re: [Tracker] Whitespace clean up



On 08/12/09 09:50, Martyn Russell wrote:
I have been meaning to write this mail for a while. We have a lot of
white space inconsistencies in the code and a some trailing white spaces
too (I am a big culprit on this).

OK, so on IRC we came up with a consensus. This is it:

- Remove all trailing whitespace
- Use tabs for indentation
- Use spaces for alignment (as Philip outlined in his email).

I have put these changes into the "whitespace" branch:

  http://git.gnome.org/cgit/tracker/log/?h=whitespace

There are 3 commits of interest:

1. Removing trailing whitespace.
2. Fixing tabulation and alignment for non-imported .[ch] code
3. Fixing tabulation and alignment for imported .[ch] code
   (this includes libinotify, libstemmer, etc).

For now, I am not sure if we should do these changes to the imported libraries. If we choose not to do this, I can revert this patch before squashing them all into one commit for merging with master.

I want to do this commit some time tomorrow. Let me know if anyone has any objections to this any why.

For future compatibility and to avoid doing this again, I have fixed my emacs client. If you use emacs this is the howto:

- First download the lisp extension for smart tabs.

  Information about smart tabs:
  http://www.emacswiki.org/emacs/SmartTabs

  Download:
  http://gist.github.com/188961

- Put this file smarttabs.el in your ~/.emacs.d/ directory

- Edit your ~/.emacs:

  - Add the line for smart tabs:

    (load-file "~/.emacs.d/smarttabs.el")

  - Add these lines for whitespace display:

    (setq show-trailing-whitespace t)
    (add-hook 'c-mode-hook 'whitespace-mode)

    You can use M-x whitespace-mode to turn it on/off manually.

This should be enough.

--
Regards,
Martyn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]