thundergolfer/mAIcroft

View on GitHub

Showing 202 of 322 total issues

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

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

    Function promise has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.ready.promise = function( obj ) {
        if ( !readyList ) {
    
            readyList = jQuery.Deferred();
    
    
    Severity: Minor
    Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

      Function attr has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          attr: function( elem, name, value ) {
              var hooks, ret,
                  nType = elem.nodeType;
      
              // don't get/set attributes on text, comment and attribute nodes
      Severity: Minor
      Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

        Function html has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            html: function( value ) {
                return access( this, function( value ) {
                    var elem = this[ 0 ] || {},
                        i = 0,
                        l = this.length;
        Severity: Minor
        Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

          Function deleteComment has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function deleteComment(id) {
              $.ajax({
                type: 'POST',
                url: opts.deleteCommentURL,
                data: {id: id},
          Severity: Minor
          Found in docs/_build/html/_static/websupport.js - About 1 hr to fix

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

                toggleClass: function( value, stateVal ) {
                    var type = typeof value;
            
                    if ( typeof stateVal === "boolean" && type === "string" ) {
                        return stateVal ? this.addClass( value ) : this.removeClass( value );
            Severity: Minor
            Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

              Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  fix: function( event ) {
                      if ( event[ jQuery.expando ] ) {
                          return event;
                      }
              
              
              Severity: Minor
              Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    finish: function( type ) {
                        if ( type !== false ) {
                            type = type || "fx";
                        }
                        return this.each(function() {
                Severity: Minor
                Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                  Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function propFilter( props, specialEasing ) {
                      var index, name, easing, value, hooks;
                  
                      // camelCase, specialEasing and expand cssHook pass
                      for ( index in props ) {
                  Severity: Minor
                  Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                    Function setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            setup: function() {
                    
                                if ( rformElems.test( this.nodeName ) ) {
                                    // IE doesn't fire change on a check/radio until blur; trigger it on click
                                    // after a propertychange. Eat the blur-change in special.change.handle.
                    Severity: Minor
                    Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                      Function getComments has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function getComments(id) {
                          $.ajax({
                           type: 'GET',
                           url: opts.getCommentsURL,
                           data: {node: id},
                      Severity: Minor
                      Found in docs/_build/html/_static/websupport.js - About 1 hr to fix

                        Function off has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            off: function( types, selector, fn ) {
                                var handleObj, type;
                                if ( types && types.preventDefault && types.handleObj ) {
                                    // ( event )  dispatched jQuery.Event
                                    handleObj = types.handleObj;
                        Severity: Minor
                        Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                          Function * has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  "*": [ function( prop, value ) {
                                      var tween = this.createTween( prop, value ),
                                          target = tween.cur(),
                                          parts = rfxnum.exec( value ),
                                          unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
                          Severity: Minor
                          Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                            Function offset has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                offset: function( options ) {
                                    if ( arguments.length ) {
                                        return options === undefined ?
                                            this :
                                            this.each(function( i ) {
                            Severity: Minor
                            Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                      if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                              support.getById && context.nodeType === 9 && documentIsHTML &&
                                              Expr.relative[ tokens[1].type ] ) {
                              
                                          context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                              Severity: Major
                              Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 hr to fix

                                Function get_comments has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def get_comments(self, limit=None):
                                        """
                                        Returns a list of redditor's comments.
                                
                                        """
                                Severity: Minor
                                Found in maicroft/users/reddit_user.py - About 55 mins 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 process_npn_phrase has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def process_npn_phrase(self, npn_tree):
                                        """
                                        Given a phrase of the form noun-preposition-noun, returns noun
                                        and preposition-noun phrases.
                                
                                
                                Severity: Minor
                                Found in maicroft/text_parser.py - About 55 mins 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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                Severity: Major
                                Found in docs/_build/html/_static/jquery-1.11.1.js - About 50 mins to fix

                                  Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      def __init__(
                                  Severity: Major
                                  Found in maicroft/social_objects.py - About 50 mins to fix

                                    Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def __init__(
                                    Severity: Major
                                    Found in maicroft/social_objects.py - About 50 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language