thundergolfer/mAIcroft

View on GitHub

Showing 202 of 322 total issues

Function defaultPrefilter has 105 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function defaultPrefilter( elem, props, opts ) {
    /* jshint validthis: true */
    var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
        anim = this,
        orig = {},
Severity: Major
Found in docs/_build/html/_static/jquery-1.11.1.js - About 4 hrs to fix

    File text_parser.py has 326 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    # -*- coding: utf-8 -*-
    
    import re
    
    from nltk import RegexpParser
    Severity: Minor
    Found in maicroft/text_parser.py - About 3 hrs to fix

      Function trigger has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          trigger: function( event, data, elem, onlyHandlers ) {
              var handle, ontype, cur,
                  bubbleType, special, tmp, i,
                  eventPath = [ elem || document ],
                  type = hasOwn.call( event, "type" ) ? event.type : event,
      Severity: Major
      Found in docs/_build/html/_static/jquery-1.11.1.js - About 3 hrs to fix

        Function process_submission has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
        Open

            def process_submission(self, submission):
                """
                Process a single submission.
        
                * Updates metrics
        Severity: Minor
        Found in maicroft/users/reddit_user.py - About 3 hrs 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 Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = animationPrefilters.length,
        Severity: Major
        Found in docs/_build/html/_static/jquery-1.11.1.js - About 3 hrs to fix

          Function results has 84 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def results(self):
                  """
                  Returns accumulated data as JSON.
          
                  """
          Severity: Major
          Found in maicroft/users/reddit_user.py - About 3 hrs to fix

            Function extract_chunks has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

                def extract_chunks(self, text):
                    """
                    Given a block of text, extracts and returns useful chunks.
            
                    TODO - Should sentiments be excluded here?
            Severity: Minor
            Found in maicroft/text_parser.py - About 3 hrs 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 Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Sizzle( selector, context, results, seed ) {
                var match, elem, m, nodeType,
                    // QSA vars
                    i, groups, old, nid, newContext, newSelector;
            
            
            Severity: Major
            Found in docs/_build/html/_static/jquery-1.11.1.js - About 3 hrs to fix

              Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  buildFragment: function( elems, context, scripts, selection ) {
                      var j, elem, contains,
                          tmp, tag, tbody, wrap,
                          l = elems.length,
              
              
              Severity: Major
              Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix

                File most_used_words.py has 289 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """
                    Credit to the Reddit Analysis project by Randal S. Olson.
                """
                
                import os
                Severity: Minor
                Found in maicroft/words/most_used_words.py - About 2 hrs to fix

                  Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      add: function( elem, types, handler, data, selector ) {
                          var tmp, events, t, handleObjIn,
                              special, eventHandle, handleObj,
                              handlers, type, namespaces, origType,
                              elemData = jQuery._data( elem );
                  Severity: Major
                  Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix

                    Function matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                        var bySet = setMatchers.length > 0,
                            byElement = elementMatchers.length > 0,
                            superMatcher = function( seed, context, xml, results, outermost ) {
                                var elem, j, matcher,
                    Severity: Major
                    Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix

                      Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              function done( status, nativeStatusText, responses, headers ) {
                                  var isSuccess, success, error, response, modified,
                                      statusText = nativeStatusText;
                      
                                  // Called once
                      Severity: Major
                      Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if (len(norm_verbs) == 1 and "be" in norm_verbs and not prepositions and noun_phrase):
                                    # Ignore gerund nouns for now
                                    if (
                                        "am" in verbs and
                                        any(n.endswith("ing") for n in norm_nouns)
                        Severity: Critical
                        Found in maicroft/social_info_extraction.py - About 2 hrs to fix

                          Function setMatcher has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
                              if ( postFilter && !postFilter[ expando ] ) {
                                  postFilter = setMatcher( postFilter );
                              }
                              if ( postFinder && !postFinder[ expando ] ) {
                          Severity: Major
                          Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix

                            Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    superMatcher = function( seed, context, xml, results, outermost ) {
                                        var elem, j, matcher,
                                            matchedCount = 0,
                                            i = "0",
                                            unmatched = seed && [],
                            Severity: Major
                            Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix

                              Function performTermsSearch has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                              Open

                                performTermsSearch : function(searchterms, excluded, terms, titleterms) {
                                  var filenames = this._index.filenames;
                                  var titles = this._index.titles;
                              
                                  var i, j, file;
                              Severity: Minor
                              Found in docs/_build/html/_static/searchtools.js - About 2 hrs 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 derive_attributes has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def derive_attributes(self):
                                      """
                                      Derives attributes using activity data.
                              
                                      """
                              Severity: Minor
                              Found in maicroft/users/reddit_user.py - About 2 hrs 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 derive_attributes has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def derive_attributes(user):
                                  """
                                  Derives attributes using activity data.
                                  """
                              
                              
                              Severity: Minor
                              Found in maicroft/social_info_extraction.py - About 2 hrs 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 init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  init = jQuery.fn.init = function( selector, context ) {
                                      var match, elem;
                              
                                      // HANDLE: $(""), $(null), $(undefined), $(false)
                                      if ( !selector ) {
                              Severity: Major
                              Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language