Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-17

Please add more analyse tools for JavaScript

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • Next
    • None
    • javascript - Editor
    • None

    Description

      As we have it for Java, PHP and I think for C/C++, I would like to see more analyse tools like dependency resolver for require modules, ES6 Modules, angular modules and other module frameworks (Show dependencies is deactivated for JS projects), find dead code, find duplicate code and so on.

      There is a plugin for such things called PMD but last changes was made in 2012 and it doesn't work as expected. For other languages you have to add rulesets which is kinda broken and so on.

      Such code analyse tools would be very great and will increase the quality of big JS applications. It should be a build in functionality to search and fix dead code, duplicates and so on.

      It is really needed that we have such functionality to find dead code / unused variables for example.
      In angular, if you remove functionality inside a controller or a service and you don't remove the arguments, like the dependend module, that you use, they will be resolved at runtime and this is a bad pattern. So if you forgot to remove the argument like myService, netbeans shows you "unused code". A functionality to find ALL unused code in a JS project, is really needed and to fix them too.

      There is a nice thing called spy.js. WebStorm has it integrated and you can profile Websites with JS AND node apps. You can see the call tree where, for example you click on smth and you see what happend. it's more than a debugger, you see CPU usages, time and so on. Here is a link to this: http://blog.jetbrains.com/webstorm/2014/04/spy-js-webstorm-secret-service/

      Here are some more links:

      http://blog.jetbrains.com/webstorm/2015/05/node-js-profiling-in-webstorm-part-1-cpu-profiling/

      http://blog.jetbrains.com/webstorm/2015/07/node-js-profiling-in-webstorm-part-2-memory-profiling/

      V8 profiling:
      https://www.jetbrains.com/help/webstorm/11.0/v8-cpu-and-memory-profiling.html?origin=old_help

      This is an other technology, which is I think built into the V8 engine.

      So keywors are: dead code detection, resolve/fix missing/unused imports (ES6 modles), copy paste detection, etc. We can handle this as sub tickets if you want.

      Regards

      Chris

      Attachments

        Activity

          People

            Unassigned Unassigned
            chrizzly Christian Lenz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: