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

Wish: pragmas

3 Answers 20 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wolfgang
Top achievements
Rank 1
Wolfgang asked on 28 Jun 2013, 06:27 AM
Hi,

at some places we used pragma to disable special warning.

Some example: disable a compiler warning for code where an Exception is analysed if code is reached. In this case the variable is there to look into the stacktrace, but the warning that it should not be used is useless, as the code should only be there for investigation.
#pragma warning disable 0168
catch (Exception exception)
#pragma warning restore 0168
{
    if (System.Diagnostics.Debugger.IsAttached) // stop at a supicious point for further investigation
    {
        System.Diagnostics.Debugger.Break();
    }
    throw;
}
So.. the errorlist from visual studio does not contain the warning any longer as wished. Is there a way to tell JustCode to also ignore all suppressed warning, or is additional work needed to ignore this warning on every developers machine?

3 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 02 Jul 2013, 09:45 AM
Hi Wolfgang,

 Thanks for contacting us.
You can ignore particular warning as shown in this demo. Once you did that a .JustCode folder will be created inside your solution folder which will contain a file with the ignored warnings. If you distribute this folder with your solution will prevent all other users from seeing the ignored warnings / errors.
I hope this will help.
Thank you.

Regards,
Zdravko
Telerik
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
0
Wolfgang
Top achievements
Rank 1
answered on 05 Jul 2013, 08:21 AM
Hi Zdravko,

In this case it is still needed to do the same Action twice.

Once ignore to get rid of it for VisualStudio warnings and once for JustCode warnings.
As VS still found other issues then JustCode it is not possible to use only one of the "Error" Outputs. (Just some simple example: '#warning: xyz')

Is there a way to reduce double warnings or (even if it is not much work) extra work ?

Regards,
Wolfgang
0
Zdravko
Telerik team
answered on 05 Jul 2013, 10:11 AM
Hello Wolfgang,

 Unfortunately, this is the only way of ignoring particular warning so far. We have plans to improve the way of ignoring parts of code by using for instance some comments, but we are still reconsidering it.
Thanks and stay tuned.

Regards,
Zdravko
Telerik
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Tags
General Discussions
Asked by
Wolfgang
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
Wolfgang
Top achievements
Rank 1
Share this question
or