Bug 328540 - Codan markers are not refreshed when Code Analysis settings change
Summary: Codan markers are not refreshed when Code Analysis settings change
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-23 23:50 EDT by Sergey Prigogin CLA
Modified: 2011-07-06 18:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Prigogin CLA 2010-10-23 23:50:28 EDT
To reproduce:
1. Turn off "Do not report an error if 'else' exists" option.
2. Create a source file with the following code:

void test() {
  if (true)
    ;
  else
    printf("hello\n");
}

3. Turn on "Do not report an error if 'else' exists" option.

The warning marker on the semicolon doesn't go away. It does go away after closing and reopening the file.
Comment 1 Elena Laskavaia CLA 2010-10-28 08:21:49 EDT
I don't know how to fix it. Do I suppose to rebuild the whole workspace?
If will be updated as soon you change something in the file.
Comment 2 Andrew Gvozdev CLA 2010-10-28 09:25:42 EDT
When you change Java Compiler Error/Warnings level it asks if you want to do a full rebuild. I think it is a sensible thing to ask.
Comment 3 Elena Laskavaia CLA 2010-10-28 20:23:19 EDT
Normally it won't run with build only per file. If you project is 1000 files and you have 2 files open do you really want to rebuild all?
Maybe I should just clear markers for which user changes something and warn user that what would happened.
Comment 4 Sergey Prigogin CLA 2010-10-28 20:55:54 EDT
Codan markers usually exist for a small set of files. How about recalculating markers just for those files?
Comment 5 Yevgeny Shifrin CLA 2011-05-11 11:32:44 EDT
Hi,

I am evaluating CDT 8.0(M7). Currently I am not using eclipse for building my project (I am building it from command line). I tried disabling all CODAN tests. I am not able to clean/remove previous codan checkers results. I tried several actions:
* closing / opening my project
* context menu on my project -> Clean Project
* context menu on my project -> Run C/C++ Code Analysis

I would appreciate any suggestions.

Thanks a lot,
Yevgeny
Comment 6 Andrew Gvozdev CLA 2011-05-11 12:17:24 EDT
(In reply to comment #5)
> I am evaluating CDT 8.0(M7). Currently I am not using eclipse for building my
> project (I am building it from command line). I tried disabling all CODAN tests.
> I am not able to clean/remove previous codan checkers results.
You can go in Problems View and apply "delete" key to the markers. Be warned about efficiency of this operation, if you trying remove a few thousands of markers it could take time (on scale of hours) to complete.
Comment 7 Andrew Gvozdev CLA 2011-05-12 12:28:42 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > I am not able to clean/remove previous codan checkers results.
> You can go in Problems View and apply "delete" key to the markers. Be warned
> about efficiency of this operation, if you trying remove a few thousands of
> markers it could take time (on scale of hours) to complete.
BTW I filed bug 345608 about performance. On the other hand I was able to remove ~40000 markers in no time in .metadata/.plugins/org.eclipse.core.resources/.projects/MyProject/.markers.