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

> but I don't think "Run your code through a formatter when you're done hacking it together" is a viable, maintainable, or scalable policy.

Just hook clang-format or clang-tidy with your build system. A lot of projects do it.

You will be surprised how inconsistent people actually are, even in project where almost everyone is sticking to these practices at 100%. And the larger the project, the worse it gets (most people are inconsistent in different ways).

The only way to get this right is to either produce hard errors when they are violated (e.g. your code won't compile, or won't be committed) or do it automatically. clang-tidy is just the way to go.




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

Search: