Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340092

Summary: Codan does not update severity in markers when a problem's severity has been changed in Preferences
Product: [Tools] CDT Reporter: Alex Ruiz <alruiz>
Component: cdt-codanAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Elena Laskavaia <elaskavaia.cdt>
Severity: normal    
Priority: P3 CC: alruiz, cdtdoug, eclipse.sprigogin
Version: 8.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed patch eclipse.sprigogin: iplog+

Description Alex Ruiz CLA 2011-03-15 16:48:57 EDT
Build Identifier: 20110204-0611

If I change the severity of a problem in the Codan Preference UI, Codan does not use the updated severity for existing markers.

I'm submitting a patch with a solution.

Reproducible: Always

Steps to Reproduce:
1. Create a C/C++ Project
2. Create a C++ file and type "asdadfasdf"
3. Codan will create a "warning" marker like "Statement has no effect..."
4. Go to Codan Preferences (Project properties -> C/C++ General -> Code Analysis)
5. Change the severity of the problem "Statement has no effect" to "Error"
6. Go back to the file and add a new line and save (this will trigger Codan)
7. The "Statement has no effect" marker is still a "warning" and it should be "error"
Comment 1 Alex Ruiz CLA 2011-03-15 16:49:42 EDT
Created attachment 191248 [details]
Proposed patch

Proposed solution.
Comment 2 Sergey Prigogin CLA 2011-03-22 23:02:11 EDT
Patch applied to HEAD > 20110322.
Comment 3 CDT Genie CLA 2011-03-22 23:23:10 EDT
*** cdt cvs genie on behalf of sprigogin ***
Bug 340092 - Codan does not update severity in markers when a problem's severity has been changed in Preferences. Patch by Alex Ruiz.

[*] CodanMarkerProblemReporter.java 1.24 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java?root=Tools_Project&r1=1.23&r2=1.24