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




I'm currently on a code-formatting-and-linting spree on my team. include-what-you-use is definitely something I'm adding.

I'm currently having to fight against the tide of the very-broken way that the codebase was built ... very much _not_ as a modern or even old school project let alone a Docker-based project. So tons of things get included everywhere and some things are even compiled multiple times. It's a bit of a nightmare.

Putting tooling into CI will help prevent problems from showing up ... but the tooling wasn't there from the start so most of the project needs to be refactored so that CI doesn't immediately turn red. And that's the biggest headache tbqh


Adding this kind of thing to existing large codebases is always challenging. If you can, add it to CI but only fail if there are new warnings. Then things will get better over time until fixing the remaining cases becomes feasible.


> If you can, add it to CI but only fail if there are new warnings.

That's a great idea. But I'm not sure how to easily do that. Getting CI to fail if clang-format reports a warning is easy enough. But... you suggest that I should store all of the existing warnings somewhere and only report new warnings? That's a lot (!) more effort unless you know an easy way




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: