Hacker News new | ask | show | jobs
by kybernetyk 4011 days ago
In Xcode at least there's a 'Build & Analyze" command (cmd-shift-b).

What I like to do is to force a deep analyze on every build. Takes a little longer to build but at least I catch some bugs when I introduce them.

1 comments

My compile is already 10 minutes, I don't want to add a static analysis pass to every build thanks.
I would like to put my two cents.

1) PVS-Studio can instead be set to run in background immediately after the edited code has been successfully compiled.

2) PVS-Studio integrates with IncrediBuild. And soon we will publish an article about it. A little spoiler. :)

Why is your compile 10 minutes? Mine is about 20 seconds for ~82000 lines of C++ (not comments), with 43000 header lines and 7669 lines of C (according to cloc), and that's on a 2008 quad-core Xeon Mac Pro.

Do you not parallel build?

130K LOC is an extremely small project. 10 minute compile steps are less common than they used to be, but early in my career I would have dreamed for 10 minute compile cycles.
Parallel build with 40 cores(2x intel xeons), 32GB ram using Visual Studio. According to cloc, we have 11k C++ files. 18k C/c++ header, with 4.5M lines of C++, and 1.5M C/C++ Header, and 700K C. We use a unity build to speed it up (to 10 minutes) without it, it's roughly 40 minutes.
Haha my project is tiny, yours is mental haha that's bonkers
He probably has more source code.
I would wager 10 minutes is far from the norm for most user's builds in X-Code. That being said, analyzing every build seems a bit much.
Analyzing is incremental too. If you only change foo.cpp then only foo.cpp will be analyzed.
Don't do a full build every time then.
well then run it on CI/daily builds.
That's fine, but making it a default option for all developers on every build wouldn't be suitable for us is what I was saying. I'm fine if it's run on the CI servers, or even if it's a requirement that I submit a "clean" static analysis report with my changes, which can be done by giving me the option (like XCode/Visual studio already do).