[Xapian-tickets] [Xapian] #787: Change source code to not use mixed spaces and tabs indentation

Xapian nobody at xapian.org
Wed Jul 17 23:13:11 BST 2019


#787: Change source code to not use mixed spaces and tabs indentation
-------------------------+-------------------------
 Reporter:  Kronuz       |             Owner:  olly
     Type:  enhancement  |            Status:  new
 Priority:  low          |         Milestone:
Component:  Other        |           Version:
 Severity:  normal       |        Resolution:
 Keywords:               |        Blocked By:
 Blocking:               |  Operating System:  All
-------------------------+-------------------------

Comment (by olly):

 Changing the rule for what the indent should be doesn't change the lack of
 a visible clue for what the indent is composed of, so I don't see changing
 this as a magic solution to solving people sending in mis-indented
 patches.  If you require only tabs, people will send patches using spaces.
 If you require only spaces, you'll get patches using tabs.

 Are there really very many editors/IDEs which are aimed at people writing
 code that don't support it?  As a convention it's certainly far from being
 unique to the Xapian codebase.

 This would also change almost every line of code, which is disruptive to
 branches and patches in progress.  It's certainly not something to do in
 the middle of GSoC, and I think would need to be carefully timed relative
 to a release cycle to avoid a lot of extra pain with backporting changes
 to the stable release.

 If we are going to change, I think it has to be to spaces-only.  Using
 tabs for indent then gets you into disagreements about how wide a tab
 character should display, and requires users to configure their editor tab
 display width, which not everyone submitting patches will do.  And it's
 not just editors - command line tools and online code and patch viewers
 all need to know the tab width, so `git`, `more`, `less`, and also trac,
 github, etc all need configuring.  At least if the indent is spaces only,
 what you write is what somebody else sees, no matter how the tool they are
 using is configured.

--
Ticket URL: <https://trac.xapian.org/ticket/787#comment:2>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list