tadashi-aikawa/owlmixin

View on GitHub

Showing 225 of 243 total issues

Consider simplifying this complex logical expression.
Open

if (!jQuery.browser) {
    jQuery.uaMatch = function(ua) {
        ua = ua.toLowerCase();

        var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
Severity: Critical
Found in docs/_static/_sphinx_javascript_frameworks_compat.js - About 1 hr to fix

    Function adjustCSS has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function adjustCSS( elem, prop, valueParts, tween ) {
        var adjusted, scale,
            maxIterations = 20,
            currentValue = tween ?
                function() {
    Severity: Minor
    Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

      Function access has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
          var i = 0,
              len = elems.length,
              bulk = key == null;
      
      
      Severity: Minor
      Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

        Function stop has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            stop: function( type, clearQueue, gotoEnd ) {
                var stopQueue = function( hooks ) {
                    var stop = hooks.stop;
                    delete hooks.stop;
                    stop( gotoEnd );
        Severity: Minor
        Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

          Function style has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              style: function( elem, name, value, extra ) {
          
                  // Don't set styles on text and comment nodes
                  if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                      return;
          Severity: Minor
          Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

            Function dispatch has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                dispatch: function( nativeEvent ) {
            
                    var i, j, ret, matched, handleObj, handlerQueue,
                        args = new Array( arguments.length ),
            
            
            Severity: Minor
            Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

              Function toggleClass has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  toggleClass: function( value, stateVal ) {
                      var type = typeof value,
                          isValidValue = type === "string" || Array.isArray( value );
              
                      if ( typeof stateVal === "boolean" && isValidValue ) {
              Severity: Minor
              Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function on( elem, types, selector, data, fn, one ) {
                    var origFn, type;
                
                    // Types can be a map of types/handlers
                    if ( typeof types === "object" ) {
                Severity: Minor
                Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                  Function uniq_by has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def uniq_by(self, func: Callable[[T], Any] = None) -> "TIterator[T]":
                          """
                          Usage:
                  
                              >>> it = TIterator([1, 2, 3, -2, -1]).uniq_by(lambda x: x**2)
                  Severity: Minor
                  Found in owlmixin/owlcollections.py - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function highlight has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function highlight(node, addItems) {
                          if (node.nodeType === 3) {
                              var val = node.nodeValue;
                              var pos = val.toLowerCase().indexOf(text);
                              if (pos >= 0 &&
                  Severity: Minor
                  Found in docs/_static/_sphinx_javascript_frameworks_compat.js - About 1 hr to fix

                    Function _displayItem has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const _displayItem = (item, searchTerms) => {
                      const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
                      const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
                      const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
                      const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
                    Severity: Minor
                    Found in docs/_static/searchtools.js - About 1 hr to fix

                      Function ajaxHandleResponses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function ajaxHandleResponses( s, jqXHR, responses ) {
                      
                          var ct, type, finalDataType, firstDataType,
                              contents = s.contents,
                              dataTypes = s.dataTypes;
                      Severity: Minor
                      Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                        Function objectSearchCallback has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            const objectSearchCallback = (prefix, match) => {
                              const name = match[4]
                              const fullname = (prefix ? prefix + "." : "") + name;
                              const fullnameLower = fullname.toLowerCase();
                              if (fullnameLower.indexOf(object) < 0) return;
                        Severity: Minor
                        Found in docs/_static/searchtools.js - About 1 hr to fix

                          Function mightThrow has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                                          mightThrow = function() {
                                                              var returned, then;
                          
                                                              // Support: Promises/A+ section 2.3.3.3.3
                                                              // https://promisesaplus.com/#point-59
                          Severity: Minor
                          Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                            Function boxModelAdjustment has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
                                var i = dimension === "width" ? 1 : 0,
                                    extra = 0,
                                    delta = 0;
                            
                            
                            Severity: Minor
                            Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                              Function getWidthOrHeight has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function getWidthOrHeight( elem, dimension, extra ) {
                              
                                  // Start with computed style
                                  var styles = getStyles( elem ),
                              
                              
                              Severity: Minor
                              Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                                Function initOnKeyListeners has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  initOnKeyListeners: () => {
                                    // only install a listener if it is really needed
                                    if (
                                      !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
                                      !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
                                Severity: Minor
                                Found in docs/_static/doctools.js - About 1 hr to fix

                                  Function handlers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      handlers: function( event, handlers ) {
                                          var i, handleObj, sel, matchedHandlers, matchedSelectors,
                                              handlerQueue = [],
                                              delegateCount = handlers.delegateCount,
                                              cur = event.target;
                                  Severity: Minor
                                  Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                                    Function setOffset has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        setOffset: function( elem, options, i ) {
                                            var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                                                position = jQuery.css( elem, "position" ),
                                                curElem = jQuery( elem ),
                                                props = {};
                                    Severity: Minor
                                    Found in docs/_static/jquery-3.6.0.js - About 1 hr to fix

                                      Function throttle has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        function throttle(func, wait, options) {
                                          var timeout, context, args, result;
                                          var previous = 0;
                                          if (!options) options = {};
                                      
                                      
                                      Severity: Minor
                                      Found in docs/_static/underscore-1.13.1.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language