VioletGiraffe / cppcheck-vs-addin

Visual Studio integration for cppcheck, an open-source static code analyzer for C++
MIT License
414 stars 86 forks source link

Per-file settings ignored #38

Open Dmitry-Me opened 10 years ago

Dmitry-Me commented 10 years ago

Visual Studio allows changing compilation settings per file - select a .cpp or .c file in Solution Explorer and for example add a new preprocessor symbols. If you look at the command line it's clear that the per-file settings are ignored both for "check whole project" and for "check current file".

VioletGiraffe commented 10 years ago

I don't see a way to take these settings into account within the current architecture. That is, short of checking a project on a file-by-file basis.

Dmitry-Me commented 10 years ago

Well, at least with checking one file this should not be hard. As to multiple files - I guess we no longer can check more that one file per cppcheck.exe run, instead we have to queue multiple files so that they are checked one by one (perhaps some of them having identical settings can be grouped together). This will also resolve the issue with pressing "Save All" with more than one file changed. Of course that's a major change and perhaps this will slow things down.

VioletGiraffe commented 10 years ago

I think it may actually speed things up a bit - running n instances of cppcheck.exe at once might be a more efficient form of parallelism than what cppcheck itself offers.

Dmitry-Me commented 10 years ago

Maybe, but running several instances of cppcheck.exe at the same time will require proper dealing with the output so that they don't interfere with each other.

VioletGiraffe commented 10 years ago

That requires attention, yes.