VioletGiraffe / cppcheck-vs-addin

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

When saving multiple files can we reduce the message boxes? #77

Closed ReggThims closed 10 years ago

ReggThims commented 10 years ago

When working through a cppcheck report, one often has multiple dirty files that you wouold like to build to check that the changes have not broken anything. However, you do not want to disturb the cppcheck results (which may have taken a lot of time to generate).

It is good that you get a dialog to warn of the potential loss of the old results, but it is a PITA to be asked for every file. Also, it would be good for the dialog box to state which file is being written with the option to skip the check for any other files that are to be saved... Of course, if VS only tells you about this file by file you may need to use the time of the box display to determine what to do... Of course, if you know about all the files, then you could offer to check them all, or to check none.

Altren commented 10 years ago

For me it would be better to have settings option to select between:

If others are ok with such idea I can implement that.

Edit: hm, I guess this would save only last file check, so grouping multiply saved files to one check is needed anyway.

VioletGiraffe commented 10 years ago

@Altren : Don't forget #6. It's a complex problem. Otherwise I like your idea, go ahead. Don't bother with multiple files yet, just make sure the check is either run or not.

ReggThims commented 10 years ago

On 12/03/2014 20:27, Violet Giraffe wrote:

@Altren https://github.com/Altren : Don't forget #6 https://github.com/VioletGiraffe/cppcheck-vs-addin/issues/6. It's a complex problem. Otherwise I like your idea, go ahead. Don't bother with multiple files yet, just make sure the check is either run or not.

— Reply to this email directly or view it on GitHub https://github.com/VioletGiraffe/cppcheck-vs-addin/issues/77#issuecomment-37460085.

Would it be possible to add a command to check the current file only?

Cambridge Electronic Design Limited Science Park, Milton Road, Cambridge CB4 0FE, UK Web: http://www.ced.co.uk Tel: +44 (0)1223 420186 Fax: +44 (0)1223 420488 Registered in the UK no. 972132

VioletGiraffe commented 10 years ago

You mean Ctrl+S?

Altren commented 10 years ago

Actually with settings option such command might be needed: let's say you have it turned off, so Ctrl+S would not start analysis. So if you want to check only current file you'll need to turn it on, then change file and save and then turn it off back - way too many actions to do a simple file check.

Altren commented 10 years ago

Now plugin will ask user only once about checking saved files. And if user would want to change this behaviour there is checkbox in settings.

About checking multiply saved files there is #6 task.