Thread:Mathmagician/@comment-3508190-20121010131546/@comment-4674838-20121010225632

I've tinkered a bit, though not too much. My usage of JSHint revolves around copy/pasting my code into the text box at http://www.jshint.com/, clicking a few checkboxes, and pressing the Lint button. I've looked at the documentation maybe once or twice just to see what the checkbox I'm clicking actually does.

Unfortunately, the web form doesn't have checkboxes for all the different options, it just has some of the most popular ones. You can set maxcomplexity with a comment though (and I presume you can do all this from the console using the global JSHINT function). To use the Wikipedia example:

In the wikipedia article, the only particularly interesting part is the Implications for Software Testing section. Before that is just a description of what a Control Flow Graph is (it's a graph data structure) and a semi-formal mathematical definition / proof of the Cyclomatic Complexity formula using vector spaces and topology... mathmaticians might find that interesting but computer scientists don't really need to know...

Brief summary:
 * 1) You have a Control Flow Graph of a program
 * 2) Cyclomatic Complexity is a fancy name for a number that is derived from the graph via a formula.
 * 3) Cyclomatic Complexity is an upper bound (maximum) for the number of test cases needed to cover all branches of the program.
 * 4) Cyclomatic Complexity is a lower bound (minimum) for the number of test cases needed to cover all paths through the program.
 * 5) *Note: in practice, some paths may be impossible (e.g. if you have an if statement whose condition is known to always evaluate to true), so the number of actual paths could be smaller.