20

I am trying to remove unused functions from my project. Since it has thousands of lines, this takes forever.

Code coverage tools may suggest functions that are not used in a given test case, but it may be dangerous to rely only on this.

Is there another tool which can help with this?

d4nyll
  • 10,729
  • 6
  • 49
  • 65
Yuvals
  • 2,897
  • 5
  • 28
  • 53

2 Answers2

14

You can try Google Closure compiler. It has different settings and you can also remove dead code automatically. You can try it here: http://closure-compiler.appspot.com/home

For more info read here: http://code.google.com/closure/compiler/docs/compilation_levels.html

daveoncode
  • 17,631
  • 14
  • 95
  • 154
1

Have a look at this question regarding Javascript static analysis tools.

Community
  • 1
  • 1
Nico Huysamen
  • 10,034
  • 9
  • 57
  • 86