Hacker Newsnew | past | comments | ask | show | jobs | submit | rcoppolo's commentslogin

Can you please explain why auto-formatting conflicts with version control/collaboration?


If I have to change one character, but the autoformatter reformats the whole file instead... that is a problem. My actual change will be lost in the formatting changes. And who says that I want to reformat anyway?

EDIT: I usually work on projects with a long history. File endings, tab/spaces, etc. are usually all over the place, and we haven't touched actual code yet. I usually have no authority and time to fix formatting issues, especially in "miscellaneous" files like yaml. And the PRs in most places I'd worked at are rejected if they contain something other than what is relevant to the topic of the PR. And then there is the issue of the hidden change, when you reformat a 1000 line long file, and also make an actual change - this will be very easy to overlook.

And finally, I might be using another tool for 99% of the editing (I use IDEA), yet sometimes I just want to edit a file quickly, outside this tool. So I do have an autoformatting setup in IDEA, should that mean that I can't use another editor for quick changes?


It takes 8 perfect shuffles to get back to the start.

https://en.wikipedia.org/wiki/Faro_shuffle


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: