Skip to content

Commit

Permalink
Fixed type for new option maxcyclomaticcomplexitysperfunction ->maxcy…
Browse files Browse the repository at this point in the history
…clomaticcomplexityperfunction
  • Loading branch information
shybyte committed Jul 20, 2012
1 parent 2a85b47 commit 0bb7486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions jshint.js
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 + ").";
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/options.js
Expand Up @@ -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');

Expand All @@ -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()
Expand Down

0 comments on commit 0bb7486

Please sign in to comment.