From b239298946b466a0c87a0c1ead4ccd75141ed740 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 6 Dec 2012 14:25:48 -0500 Subject: [PATCH] Allow higher cyclomatic complexity in functions that sanely use switch statements. --- ui/jquery.ui.accordion.js | 1 + ui/jquery.ui.autocomplete.js | 1 + ui/jquery.ui.dialog.js | 1 + ui/jquery.ui.menu.js | 1 + ui/jquery.ui.slider.js | 1 + 5 files changed, 5 insertions(+) diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 7914f7c5f..60475b8ba 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -166,6 +166,7 @@ $.widget( "ui.accordion", { }, _keydown: function( event ) { + /*jshint maxcomplexity:15*/ if ( event.altKey || event.ctrlKey ) { return; } diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 5edb84d44..c049b8569 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -66,6 +66,7 @@ $.widget( "ui.autocomplete", { this._on( this.element, { keydown: function( event ) { + /*jshint maxcomplexity:15*/ if ( this.element.prop( "readOnly" ) ) { suppressKeyPress = true; suppressInput = true; diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index eac818fe0..b2b8be8c0 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -553,6 +553,7 @@ $.widget("ui.dialog", { }, _setOption: function( key, value ) { + /*jshint maxcomplexity:15*/ var isDraggable, isResizable, uiDialog = this.uiDialog; diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 45c1ec2e4..41a69c472 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -173,6 +173,7 @@ $.widget( "ui.menu", { }, _keydown: function( event ) { + /*jshint maxcomplexity:20*/ var match, prev, character, skip, regex, preventDefault = true; diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index d9fc1b132..02fee8364 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -119,6 +119,7 @@ $.widget( "ui.slider", $.ui.mouse, { this._on( this.handles, { keydown: function( event ) { + /*jshint maxcomplexity:25*/ var allowed, curVal, newVal, step, index = $( event.target ).data( "ui-slider-handle-index" ); -- 2.39.5