Page MenuHomePhabricator

Write documentation for configuring editors to strip trailing whitespace
Closed, WontfixPublic

Description

ArcanistTextLinter checks for trailing whitespace and trims it. This is suboptimal solution for these reasons:

  1. It asks user whether it should apply the changes by default.
  2. In arc diff, we don't start unit tests until lint finishes.

Optimal solution is to strip the trailing whitespace in editor upon saving a file. Documentation explaining how to set this up in different editors may be useful. We are interested at least in these editors:

  • vi
  • emacs
  • Eclipse
  • Xcode

Please include screenshots and link this document from the lint message.

Revisions and Commits

Event Timeline

vrana updated the task description. (Show Details)
vrana added a subscriber: vrana.

Are people trying to configure this and unable to figure out how? It seems like Googling "$EDITOR strip trailing whitespace" gives a lot of good hits for all the listed editors, and is a general solution that works for any editor (SciTE, TextMate, Notepad++, etc). Why is it valuable for us to write a guide with screenshots?

Probably just mentioning this in the message would be sufficient. Two experienced smart engineers brought this up recently. I guess the thinking is - lint already does that for me, why should I care?

I've tried to find the solution for vim and a good solution is not trivial. E.g. at Stack Overflow.

Solution for XCode is also surprisingly difficult and varies across versions.

epriestley claimed this task.

This hasn't really surfaced to the upstream in the last couple years.

epriestley changed the visibility from "All Users" to "Public (No Login Required)".Nov 10 2015, 7:18 PM