JustCode Custom Rule Definition

2 posts, 0 answers
  1. Pratham
    Pratham avatar
    2 posts
    Member since:
    Nov 2014

    Posted 07 Jul 2015 Link to this post

    Hi All,

    I need to have a JustCode Null Check Rule which will give JustCode error if anyone try to use or access an object without having Not Nothing condition in VB.NET. So, it means it will be mandatory to check if Object IsNot Nothing then only one can access or use an object in code with this rule like below:

    If myObject IsNot Nothing Then 

    Console.WriteLine(myObject.Tostring());

    EndIf

    So, how can I generate or enforce such rule with JustCode? Please help in achieving solution for this problem asap.  

    Thanks,

    Pratham

     

     

  2. Svetlozar
    Admin
    Svetlozar avatar
    271 posts

    Posted 10 Jul 2015 Link to this post

    Hello,

    Thank you for your feedback!

    You could create your own JustCode extension that could provide a warning and q quick fix for your specific case. We have a sample solution you could start with - justcode-extensions

    Regards,
    Svetlozar
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top