On Sun, Jan 21, 2024 at 4:05 PM Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx> wrote: > I don’t know of any global config. So a pre-commit hook is probably the > safest bet. Personally I set all my editors to remove trailing space and > they very seldom mess it up. :) Fair point -- Apparently this was a gap in my nvim config. Easily added. On Mon, Jan 22, 2024 at 2:55 PM Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx> wrote: > Oh, and this thread reminded me https://lore.kernel.org/git/xmqqle8hrtcs.fsf@gitster.g/T/#t > > that editorconfig[1] has this option: > > ``` > trim_trailing_whitespace = true > ``` > > So I guess that should be enough for all editors that respect this > config (although I haven’t tested it). > > 🔗 1: https://editorconfig.org/ Is there a good reason that this should not just be added to the `.editorconfig` in this repository? Would a patch for this be welcome? I do see that there are ~130 files with trailing whitespace in maint today, though I suspect that most of those are not intentional. Brian Lyles