Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Finding Unused Names (Variables)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Finding Unused Names (Variables)

    Is there a way within the NS editor to find unused variables?

    I tried using the VS editor and it's not obvious how to do that either.

    Using the find tool works, but is tedious if one has a lot of unused names (like when you edit an existing piece of code).

    Anyone have any ideas?

    Thanks

    #2
    Hello x703jko,

    Thank you for writing in. There is no native way to do this in the NinjaScript Editor unfortunately. If you would like I can submit a feature request on your behalf for the NinjaScript editor to be able to locate unused variables/methods. Please let me know if you would like me to do this.

    There are many tools that have been made for this purpose which are publicly available on the internet.

    Please let me know if I may be of further assistance.
    Michael M.NinjaTrader Quality Assurance

    Comment


      #3
      Originally posted by x703jko View Post
      Is there a way within the NS editor to find unused variables?

      I tried using the VS editor and it's not obvious how to do that either.

      Using the find tool works, but is tedious if one has a lot of unused names (like when you edit an existing piece of code).

      Anyone have any ideas?

      Thanks
      FxCop. I think the functionality has been included into VS.

      Comment


        #4
        Originally posted by NinjaTrader_MichaelM View Post
        Hello x703jko,

        Thank you for writing in. There is no native way to do this in the NinjaScript Editor unfortunately. If you would like I can submit a feature request on your behalf for the NinjaScript editor to be able to locate unused variables/methods. Please let me know if you would like me to do this.

        There are many tools that have been made for this purpose which are publicly available on the internet.

        Please let me know if I may be of further assistance.
        Yes, I believe a feature like this would be a useful thing to have. Is it already in NT8? If not, it would be a good thing for both NT7 and 8.

        What are the various publicly available tools to do this? I know about Resharp, but it is not freeware and the price is somewhat high for something that I may use relatively infrequently.

        Comment


          #5
          Originally posted by x703jko View Post
          Yes, I believe a feature like this would be a useful thing to have. Is it already in NT8? If not, it would be a good thing for both NT7 and 8.

          What are the various publicly available tools to do this? I know about Resharp, but it is not freeware and the price is somewhat high for something that I may use relatively infrequently.
          For NT8, get it from Visual Studio.

          I am not quite sure that you can do the same with NT7. You may have to use FxCop.
          Attached Files

          Comment


            #6
            Hello x703jko,

            I have submitted this as a feature request on your behalf. I will update this thread when I have further information.

            Thank you for your continued patience in the meantime.
            Michael M.NinjaTrader Quality Assurance

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sjsj2732, Yesterday, 04:31 AM
            0 responses
            33 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            286 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            284 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            133 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            91 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X