I'm used to having my compiler complain when I do something stupid like a typo on a variable name but JavaScript has a habit of letting this pass.  Are there any static analysis tools for JavaScript?...
I'm currently writing a JavaScript compiler in ANTLR+Java.  I've read questions here on Stack Overflow on how to proceed with the execution - and the answer is always that it would be way too hard to do a static compilation (without JIT-infor...
Is it possible to determine whether or not a javascript function is "pure", using javascript?     A function is said to be pure when it behaves in a predictable way, in the sense that for each x, the function will always return the same assoc...
I am looking for a way, using static analysis of two JavaScript functions, to tell if they are the same. Let me define multiple definitions of "the same".  Level 1: The functions are the same except for possible different whitespace, e.g. TAB...
I want to get full AST ( Abstract Syntax Tree ) of a javascript code and I have decided to use V8's parser. After trying to use V8, what I realize is that V8 does not parse functions which are not executed ( dead code ). My assumption is V8 is tr...
I have an application at http://prettydiff.com/prettydiff.js.  I started writing this application before interpreters got really fast and learned to prefer strict typing.  I now want to enforce strict typing in my code.  This application is too large...
I've run into this problem a few times. I change the result or parameters of a resource and I search for where it's used and change that too. But every so often I missed some obscure part of the app.  What is a good technique to find all plac...
I'm playing around with Facebook Flow and wonder, why does the following function not type check? It obviously uses a union type denoted by '|'.      declare var f: ((x: any) => number) | ((x: any) => string);     function f(x) {...
I'm taking on a task to find issues in a large number of short Javascript codes. One of the things I'm looking for is instance of a variable usage before explicit assignment, like so:  var a; var b = a + 10; // a is not explicitly assigned a...
I'm writing a static analyzer for JavaScript and I have to keep track of all of the local variables at any point of the code. What are all the ways to introduce new local variables to the scope in JavaScript?...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.