This is a migrated thread and some comments may be shown as answers.

Add ability to ignore certain warnings?

16 Answers 183 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jamie
Top achievements
Rank 1
Jamie asked on 18 Nov 2009, 06:24 PM
It'd be nice to have the ability to ignore all warnings with a certain title.  I get a warning for every event handhandler, because EventArgs e or object sender isn't used.  I can go through and say ignore this warning, but if I create another method for handling an event, I have to do it again.

16 Answers, 1 is accepted

Sort by
0
Chris
Telerik team
answered on 18 Nov 2009, 08:04 PM
Hi Jamie,
We'll improve JustCode to not show this warning for event handler methods. Meanwhile you could go to the JustCode Options / Code Analysis / Warnings / C# and disabled the option for "Show warning for unused parameters".
Should you decide to leave this option on you could also batch-ignore warnings (or errors) of a given type by opening the JustCode Errors Window where you can filter / group / sort by different criteria (select multiple items, then right-click and choose Ignore).

Hope this helps.

Best wishes,
Chris
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Joel Corley
Top achievements
Rank 2
answered on 02 Dec 2009, 01:19 AM
Another broad category to ignore is any unused variable in a designer.cs file (or maybe any warning whatsoever) since these are compiler generated files.  If not, then maybe have the ability to ignore files matching a wildcard.
0
Chris
Telerik team
answered on 03 Dec 2009, 04:26 PM
Hi Joel,
Yes, this is already on our todo list and hopefully soon we'll make JustCode not show warnings for generated files.

Best wishes,
Chris
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Daniel
Top achievements
Rank 1
answered on 14 Oct 2010, 05:10 PM
Hi Chris,

On November 18, 2009 you indicated that you would improve JustCode to not show this warning for event handler methods. When will this be implemented? I am considering JustCode as an alternative to ReSharper, but this particular issue needs to be resolved before I can do so.

Best regards,
Daniel
0
Svetlozar
Telerik team
answered on 20 Oct 2010, 12:55 PM
Hi Daniel,

Thanks for getting back to us on that issue. JustCode no longer reports "Unused Parameter" warning for event handler methods. This issue was fixed in our latest internal build that we released recently. You can download it and give it a try.

If you have any other problems or suggestions, please don't hesitate to write back.

Kind regards,
Svetlozar Angelov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel
Top achievements
Rank 1
answered on 20 Oct 2010, 04:15 PM
Hi Svetlozar,

There are two suggestions I would like to make: both of which are important before I can make a permanent switch from ReSharper to JustCode:

1) When using statements are organized, they should be organized into groups based on the root namespace (with groups separated by a blank line) before they are sorted alphabetically.  System imports should always be displayed first.  ReSharper does this very nicely.  For example:

using System;
using System.Data;
using System.Data.SqlTypes;
using System.Web.UI;
using System.Web.UI.WebControls;
  
using MyServices;
using MyServices.Contacts;
using MyServices.Diagnostics;
  
using MyUtilities;
using MyUtilities.Sql;

2) When sorting code elements, code regions must remain intact.  Sorting should be applied to each individual code region, rather than extracting code out of marked regions and then shuffling the region markers to the bottom of the class.

Best regards,
Daniel
0
Svetlozar
Telerik team
answered on 26 Oct 2010, 12:28 PM
Hello Daniel,

Thank you for the nice suggestions.

We already have an item for the first one. Here is the link for the item associated with it in our public issue tracking system - http://www.telerik.com/support/pits.aspx#/public/justcode/2701
I increased its priority. You can vote for it and track its progress. 

As for the second suggestion, I added your account to the PITS item associated with it. You should be able to monitor its progress.

All the best,
Svetlozar Angelov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Stuart Hemming
Top achievements
Rank 2
answered on 27 Oct 2010, 12:38 PM
Svetlozar,

> JustCode no longer reports "Unused Parameter" warning for event handler methods. This issue was
> fixed in our latest internal build that we released recently. 
I beg to differ, I'm using build 1018 and, as you can clearly see from that attached screen shot JC is highlighting a number of parameters of event handlers that aren't used.

-- 
Stuart
0
Svetlozar
Telerik team
answered on 27 Oct 2010, 01:00 PM
Hi Stuart Hemming,

This is problem in our event handler methods analysis. Could you please check if making the event handlers private fix the problem? We will improve that for the official release.

Thanks for the feedback.

All the best,
Svetlozar Angelov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Daniel
Top achievements
Rank 1
answered on 06 Jul 2011, 06:50 PM
My current ReSharper license has just come up for renewal and so I decided to use it as an opportunity to re-evaluate JustCode, because overall I prefer working with Telerik products.  However, there are still a few issues that prevent me from switching to JustCode, and so it looks like I will need to renew my ReSharper license (at least in the short term):

1) Request #1 from my post on Oct 10, 2010 does not yet appear to be implemented.

2) The function to re-order code elements when formatting does not appear to work at all when a code region exists within a class.  We make extensive use of code regions throughout our C# classes and we manually order the elements alphabetically within each region.

3) When a code region exists, the code format feature sometimes removes the blank line between the #region directive and the first line of code, and sometimes removes the blank line between the last line of code and the #endregion directive.

Cross reference: Format code regions and using statements
0
Svetlozar
Telerik team
answered on 19 Jul 2011, 08:38 AM
Hi Daniel,

p1. should be fixed. Could you please send us an example where we incorrectly show a warning for unused event handler parameter, it might be a case we have missed. 

As for the #region support when reordering, we are currently planning our next release, so we will have that in mind and we will increase its priority.

Thank you for your feedback.

Greetings,
Svetlozar
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Stuart Hemming
Top achievements
Rank 2
answered on 19 Jul 2011, 08:41 AM
Svetlozar,

I know that your reply wasn't directed at me, but I'd like to add that I too would appreciate it if #region support were improved.

-- 
Stuart
0
Daniel
Top achievements
Rank 1
answered on 19 Jul 2011, 02:19 PM
Hi Svetlozar,

P1 refers to the organization of using statements - sorry if I was unclear on that.  Please see:

http://www.telerik.com/community/forums/justcode/general-discussions/format-code-regions-and-using-statements.aspx#1381354
http://www.telerik.com/community/forums/justcode/code-analysis/add-ability-to-ignore-certain-warnings.aspx#1387926

Thanks again for your time and attention.  JustCode has some very nice features, I'd love to be able to switch from ReSharper.

Best regards,
Daniel
0
Svetlozar
Telerik team
answered on 19 Jul 2011, 03:27 PM
Hi Daniel,

I am sorry for the misunderstanding. We already improved Organize Usings, we put System.* namespaces on top, but we don't add a new line between sections. We already have that logged - an option for new line between using statements sections and I increased its priority.

Thank you for your feedback.

Regards,
Svetlozar
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Nick
Top achievements
Rank 1
answered on 11 Nov 2011, 05:30 PM
This is still an issue, at least in VB.NET.

Private Sub dgMessages_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgMessages.ItemCommand

And I'm getting a warning of

VisualBasic.Net: Unused parameter 'source'

:(
0
Svetlozar
Telerik team
answered on 18 Nov 2011, 11:21 AM
Hi Nick,

Which version of JustCode do you have? I tested with the latest 2011 Q3 release and I don't get a warning for that

Public Class Register
    Inherits System.Web.UI.Page

    Private WithEvents dgMessages As System.Web.UI.WebControls.DataGrid

    Private Sub dgMessages_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgMessages.ItemCommand
    End Sub

End Class

We will highly appreciate if you could provide a sample solution that demonstrates the problem.

Regards,
Svetlozar
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Code Analysis
Asked by
Jamie
Top achievements
Rank 1
Answers by
Chris
Telerik team
Joel Corley
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Svetlozar
Telerik team
Stuart Hemming
Top achievements
Rank 2
Nick
Top achievements
Rank 1
Share this question
or