From 0bb748641b8f262f5e7410dd82468b03e2d12028 Mon Sep 17 00:00:00 2001 From: shybyte Date: Fri, 20 Jul 2012 08:48:35 +0200 Subject: [PATCH] Fixed type for new option maxcyclomaticcomplexitysperfunction ->maxcyclomaticcomplexityperfunction --- jshint.js | 6 +++--- tests/unit/options.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jshint.js b/jshint.js index 166fd3095d..57a440ef54 100644 --- a/jshint.js +++ b/jshint.js @@ -216,7 +216,7 @@ JSHINT, json, jquery, jQuery, keys, label, labelled, last, lastcharacter, lastsemic, laxbreak, laxcomma, latedef, lbp, led, left, length, line, load, loadClass, localStorage, location, log, loopfunc, m, match, maxerr, maxlen, maxnestedblockdepthperfunction, maxstatementsperfunction, - maxparametersperfunction, maxcyclomaticcomplexitysperfunction + maxparametersperfunction, maxcyclomaticcomplexityperfunction member,message, meta, module, moveBy, moveTo, mootools, multistr, name, navigator,nestedBlockDepth, new, newcap, noarg, node, noempty, nomen, @@ -353,7 +353,7 @@ var JSHINT = (function () { maxstatementsperfunction: false, // int maxnestedblockdepthperfunction: false, // int maxparametersperfunction: false, //int - maxcyclomaticcomplexitysperfunction: false //int + maxcyclomaticcomplexityperfunction: false //int }, // These are JSHint boolean options which are shared with JSLint @@ -3436,7 +3436,7 @@ loop: for (;;) { } }, verifyMaxCyclomaticComplexityPerFunction: function () { - var max = option.maxcyclomaticcomplexitysperfunction; + var max = option.maxcyclomaticcomplexityperfunction; var cc = this.cyclomaticComplexityCount; if (max && cc > max) { var message = "Cyclomatic complexity is to high per function (" + cc + ")."; diff --git a/tests/unit/options.js b/tests/unit/options.js index 9969f9c18e..88e226fd9d 100644 --- a/tests/unit/options.js +++ b/tests/unit/options.js @@ -1217,9 +1217,9 @@ exports.maxparametersperfunction = function () { }; /* - * Tests the `maxcyclomaticcomplexitysperfunction` option + * Tests the `maxcyclomaticcomplexityperfunction` option */ -exports.maxcyclomaticcomplexitysperfunction = function () { +exports.maxcyclomaticcomplexityperfunction = function () { var fixture = '/fixtures/max-cyclomatic-complexity-per-function.js'; var src = fs.readFileSync(__dirname + fixture, 'utf8'); @@ -1228,10 +1228,10 @@ exports.maxcyclomaticcomplexitysperfunction = function () { .addError(15, "Cyclomatic complexity is to high per function (2).") .addError(25, "Cyclomatic complexity is to high per function (2).") .addError(47, "Cyclomatic complexity is to high per function (8).") - .test(src, { maxcyclomaticcomplexitysperfunction: 1 }); + .test(src, { maxcyclomaticcomplexityperfunction: 1 }); TestRun() - .test(src, { maxcyclomaticcomplexitysperfunction: 8 }); + .test(src, { maxcyclomaticcomplexityperfunction: 8 }); TestRun()