Wish: pragmas

4 posts, 0 answers
  1. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 28 Jun 2013 Link to this post

    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?
  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 02 Jul 2013 Link to this post

    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.
  3. DevCraft banner
  4. Wolfgang
    Wolfgang avatar
    98 posts
    Member since:
    Oct 2012

    Posted 05 Jul 2013 Link to this post

    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
  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 05 Jul 2013 Link to this post

    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.
Back to Top