JavaScript source code analyzer

Does anyone know of a good, extensible source code analyzer that parses JavaScript files?

+44
javascript code-analysis
Dec 01 '08 at 16:22
source share
10 answers

In the interest of keeping this issue current, there is a JSLint plug called JSHint . An explanation of why JSHint was created can be found here , but in short:

JSHint is a JSLint fork, a tool written and maintained by Douglas Crockford. JSLint has served me well for quite some time, but in the last few years it has received uncomfortably stubborn and hostile code towards you. It is quickly converted from a tool that helps developers prevent errors in a tool that guarantees you write your code like Douglas Crockford.

+61
Jun 15 2018-11-11T00:
source share

JSLint has historically been the primary tool for this, but there are several more:

+23
Dec 01 '08 at 16:33
source share

If you haven't found it yet, you should take a look at the Google Closure compiler. Compiles your JavaScript and finds errors in the code. http://code.google.com/closure/compiler/docs/gettingstarted_api.html

+4
Jun 17 '11 at 22:30
source share

I tried ESLint and found it to be good. You can also add your own rules there. Here is the github repository: https://github.com/nzakas/eslint

+4
08 Sep '13 at 15:58
source share

JSAnalyse has just been published on codeplex. This is a tool that parses dependencies between javascript files. You can even determine the allowed dependencies, and JSAnalysis checks whether certain rules are met or not. This allows you to track javascript dependencies even in large projects and have a clean architecture.

JSAnalyse can be run as a command line tool or configured through Visual Studio Layer Diagramm . It is also easily integrated into the assembly. With private logs, you can control dependencies.

+2
Apr 13 '12 at 7:11
source share

There is a parser called the ECMAScript parsing framework for multi-purpose analysis (esprima), located at http://esprima.org/ with several examples of tools that can be used in some analysis

ECMAScript parsing framework for multipurpose parsing

+2
Mar 28 '13 at 1:33
source share

In addition to JSLint, JSHint, ESLint, Plato, Google Closure-Linter, there is another tool called Esprima. Here is a link to it: http://esprima.org/

Also, this is the github link for the Esprima tool: https://github.com/ariya/esprima

I had trouble installing while trying Google Closure-Linter for Windows. But the webpage mentions that Windows support is experimental. All other tools are easy to use.

+2
Sep 08 '13 at 16:42 on
source share

I found JSLint that helps fix many common errors, etc .; however, I hope to find something that I can add my own rules and such to help automate some of the coding standards that my company wants to implement in JavaScript.

http://www.jslint.com/

I need to learn more about the extension model.

+1
Dec 01 '08 at 16:33
source share

There are several tools in the list of tools for static code analysis in wikipedia with JavaScript support, you can also see Debugging JavaScript , if any of the mentioned tools help. There are also some good YUI tools (Yahoo! Developer Network), as well as many useful components.

I have always used JSLint myself, and this is the only analysis tool for JS I have tried. I loved JavaScript more and more, but good tools still remain a problem. :(

+1
Dec 01 '08 at 18:57
source share

I use Aptana to parse JavaScript files. It catches a lot of goofs (if the condition is with one =). It also describes the layout of the class. I believe that it implements jslint implementation.

+1
Jan 25 2018-11-11T00:
source share



All Articles