Bug 319328 - Inconsistent behavior of Codan problem markers
Summary: Inconsistent behavior of Codan problem markers
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: CDT Codan Inbox CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 19:02 EDT by Sergey Prigogin CLA
Modified: 2011-07-08 04:08 EDT (History)
3 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-07-08 19:02:40 EDT
CDT HEAD:

Codan problem markers are created when a file is opened in an editor, but are not removed when the editor is closed. This may cause markers in the Problems view to become stale if changes made to other files eliminate the cause of the problem.
Comment 1 Elena Laskavaia CLA 2010-07-08 21:07:35 EDT
This is intended behavior - codan markers are persistent.
Your statement is true for all persistent markers - if file changes outside
of eclipse they become obsolete. Even if they are not persistent - if you
change file in vi outside of eclipse nothing we can do about it.
Comment 2 Sergey Prigogin CLA 2010-07-08 21:21:48 EDT
(In reply to comment #1)

The inconsistency happens during normal editing in Eclipse. Consider the following scenario:

test.h
------
struct A {
  int x;
};

test.cc
-------
#include "test.h"
B b;

1. User opens test.cc and gets a problem marker on test.cc line 2.
2. User closes test.cc.
3. User opens test.h changes A to B and saves the file.

The marker on test.cc line 2 persists in spite of the name resolution problem being fixed.
Comment 3 Elena Laskavaia CLA 2010-07-08 22:07:58 EDT
There are problems that are generated on demand and some that are not (for example some complex dead lock problem which is very computationally expensive).
So for the first case we can re-run checkers when file is open.
Comment 4 Sergey Prigogin CLA 2010-07-08 22:39:36 EDT
It makes sense to have some symmetry. The problem markers generated by the checkers that run only when a file is open in an editor should be erased when the file is closed. The markers created by other checkers should stay.
Comment 5 Elena Laskavaia CLA 2010-07-09 13:56:36 EDT
that sounds good