5 ms·
no button in the IDE :)
by moru0011 11y ago
no button in the IDE :)
- anon1385 11y agoHave you used one of the popular IDEs recently (Visual Studio, Xcode etc)? It's built into most these days. Everybody I know who actually uses static analysis does so because it's built into their IDE and very easy to use.
- kybernetyk 11y agoIn 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.
- maccard 11y agoMy compile is already 10 minutes, I don't want to add a static analysis pass to every build thanks.
- kybernetyk 11y agoDon't do a full build every time then.
- andymcsherry 11y agoI 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.
- kybernetyk 11y agoAnalyzing is incremental too. If you only change foo.cpp then only foo.cpp will be analyzed.
- 72deluxe 11y agoWhy 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?
- Ono-Sendai 11y agoHe probably has more source code.
- maccard 11y agoParallel 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.
- 72deluxe 11y agoHaha my project is tiny, yours is mental haha that's bonkers
- kasey_junk 11y ago130K 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.
- AndreyKarpov 11y agoI 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. :)
- verinus 11y agowell then run it on CI/daily builds.
- maccard 11y agoThat'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).
- AndreyKarpov 11y agoAlso, I recommend you to try Incremental analysis mode in PVS-Studio. It corrects on its own and doesn't distract programmer. http://www.viva64.com/en/b/0305/#ID0ECLDK http://www.viva64.com/en/b/0305/#ID0ECLDK