Whitespace cleanup?
"Larry Garfield" <[email protected]>
| Newsgroups | gmane.comp.php.documentation.general |
|---|---|
| Message-ID | <[email protected]> |
Hi folks. New guy here. Please be gentle. :-) I filed a PR to add a .editorconfig[1] file to the docs repo, mainly to standardize the odd indentation that docs uses[2]. The file I used also includes trailing whitespace trimming, which is what I use on virtually every project as it's a very common standard to help minimize jitter in PRs. The problem came up that there's... a lot of trailing whitespace right now. I made another PR to manually trim trailing whitespace[3], and it's... large enough that I can't review the whole thing to see if it causes any issues in edge cases. (5000+ files affected.) (The question has been raised that it may be troublesome for code samples. I doubt it would be, but with 5000+ files I haven't checked them all to be sure of that.) And as several people pointed out, whitespace changes create lots of extra noise for translators, which is ungood. I do believe we should move toward cleaning up trailing whitespace at some point. How, I'm flexible. The options I see are: 1) Do one massive commit that cleans up all trailing whitespace (after making sure it doesn't break anything), then enable whitespace trimming in .editorconfig to help keep it that way. This is the "rip the bandaid off" approach. Pros: Any disruption is a one-time deal. Cons: It's a very very big patch, large enough that it may be difficult to catch any possible edge cases in advance. 2) Add the .editorconfig file as is, and as people edit files for other reasons (if they're using a supporting IDE, which is a whole lot of them) those files will get whitespace cleaned up. Pros: Any file that gets touched is getting touched anyway, so fewer file-level false notices for translators. Cons: Patches that are making other changes get lots of extra noise in them for a while. 3) Commit the .editorconfig file now without that flag set, then manually have a series of patches to clean up whitespace in various files over time. Eventually re-add that flag in .editorconfig. Pros: There are still discrete "whitespace cleanup" PRs that translators can ignore. Cons: It could take a while... like, a long while. And in the meantime there's nothing to avoid new trailing whitespace from getting introduced. I know exactly zero about translator workflow currently, so if you're working on translations your input would be most welcome. What would be least disruptive for you? The main thing for me is getting the indentation automation in place, frankly. The whitespace cleanup is a secondary issue for me. [1] https://editorconfig.org/ [2] https://github.com/php/doc-en/pull/129 [3] https://github.com/php/doc-en/pull/131 -- Larry Garfield [email protected]