Allow higher cyclomatic complexity in functions that sanely use switch statements.

This commit is contained in:
Scott González 2012-12-06 14:25:48 -05:00
parent ebf8a60187
commit b239298946
5 changed files with 5 additions and 0 deletions

View File

@ -166,6 +166,7 @@ $.widget( "ui.accordion", {
}, },
_keydown: function( event ) { _keydown: function( event ) {
/*jshint maxcomplexity:15*/
if ( event.altKey || event.ctrlKey ) { if ( event.altKey || event.ctrlKey ) {
return; return;
} }

View File

@ -66,6 +66,7 @@ $.widget( "ui.autocomplete", {
this._on( this.element, { this._on( this.element, {
keydown: function( event ) { keydown: function( event ) {
/*jshint maxcomplexity:15*/
if ( this.element.prop( "readOnly" ) ) { if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true; suppressKeyPress = true;
suppressInput = true; suppressInput = true;

View File

@ -553,6 +553,7 @@ $.widget("ui.dialog", {
}, },
_setOption: function( key, value ) { _setOption: function( key, value ) {
/*jshint maxcomplexity:15*/
var isDraggable, isResizable, var isDraggable, isResizable,
uiDialog = this.uiDialog; uiDialog = this.uiDialog;

View File

@ -173,6 +173,7 @@ $.widget( "ui.menu", {
}, },
_keydown: function( event ) { _keydown: function( event ) {
/*jshint maxcomplexity:20*/
var match, prev, character, skip, regex, var match, prev, character, skip, regex,
preventDefault = true; preventDefault = true;

View File

@ -119,6 +119,7 @@ $.widget( "ui.slider", $.ui.mouse, {
this._on( this.handles, { this._on( this.handles, {
keydown: function( event ) { keydown: function( event ) {
/*jshint maxcomplexity:25*/
var allowed, curVal, newVal, step, var allowed, curVal, newVal, step,
index = $( event.target ).data( "ui-slider-handle-index" ); index = $( event.target ).data( "ui-slider-handle-index" );