Hacker News new | past | comments | ask | show | jobs | submit login

It kills the history in the version control system.



This is true only if the formatter is introduced mid-project. Additionally, for git, it only messes up git-blame, you can still traverse the history and see changes prior to an autoformatting change.


It doesn't work for GUIs (e.g. github), but on the command line you can do `git blame -w` to ignore whitespace.


Github supports a ?w=1 param to do the same.

It disables the commenting interface on PRs however :(


I’m mixed on this if you use tools like GitHub or gitlab where it’s fairly easy to navigate the history so my rule is picking a quiet time to autoformat (i.e. coordinating open branches) and then marking the commit clearly as having no other impact so people can avoid reviewing it line by line.


I hate to respond with just 'this' but this is the correct response.

The problems we've had are all because we can't get consensus to auto-format, but then someone gets frustrated because they can't understand the code they're reading after someone committed mortal indentation sins, so then they auto-format and bam, history is worthless again.




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

Search: