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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            309 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X