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

>[...] I hate doing code reviews where the author has run a formatting tool that introduced diffs all over parts of the file that they didn't actually touch. [...]

Teach them to commit properly:

1. Run an autoformatter on the file

2. Commit

3. Make desired changes

4. Commit again

The same principle applies to refactoring as well, you want to keep your commits 'atomic' aka containing a single unit of work. Autoformatting and changing the code are two separate units.




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

Search: