thundergolfer/mAIcroft

View on GitHub

Showing 202 of 322 total issues

File jquery-1.11.1.js has 6829 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.11.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in docs/_build/html/_static/jquery-1.11.1.js - About 2 wks to fix

    Function Sizzle has 1347 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    (function( window ) {
    
    var i,
        support,
        Expr,
    Severity: Major
    Found in docs/_build/html/_static/jquery-1.11.1.js - About 6 days to fix

      Function results has a Cognitive Complexity of 196 (exceeds 5 allowed). Consider refactoring.
      Open

          def results(self):
              """
              Returns accumulated data as JSON.
      
              """
      Severity: Minor
      Found in maicroft/users/reddit_user.py - About 4 days 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

      File reddit_user.py has 1379 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
      from __future__ import print_function
      
      import calendar
      import datetime
      Severity: Major
      Found in maicroft/users/reddit_user.py - About 3 days to fix

        File underscore-1.3.1.js has 665 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        //     Underscore.js 1.3.1
        //     (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
        //     Underscore is freely distributable under the MIT license.
        //     Portions of Underscore are inspired or borrowed from Prototype,
        //     Oliver Steele's Functional, and John Resig's Micro-Templating.
        Severity: Major
        Found in docs/_build/html/_static/underscore-1.3.1.js - About 1 day to fix

          File websupport.js has 638 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * websupport.js
           * ~~~~~~~~~~~~~
           *
           * sphinx.websupport utilities for all documentation.
          Severity: Major
          Found in docs/_build/html/_static/websupport.js - About 1 day to fix

            Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                ajax: function( url, options ) {
            
                    // If url is an object, simulate pre-1.5 signature
                    if ( typeof url === "object" ) {
                        options = url;
            Severity: Major
            Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 day to fix

              Function Stemmer has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
              Open

              var Stemmer = function() {
              
                var step2list = {
                  ational: 'ate',
                  tional: 'tion',
              Severity: Minor
              Found in docs/_build/html/_static/searchtools.js - About 1 day 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 setDocument has 216 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              setDocument = Sizzle.setDocument = function( node ) {
                  var hasCompare,
                      doc = node ? node.ownerDocument || node : preferredDoc,
                      parent = doc.defaultView;
              
              
              Severity: Major
              Found in docs/_build/html/_static/jquery-1.11.1.js - About 1 day to fix

                Function load_attributes has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                Open

                def load_attributes(user, chunk, post_permalink):
                    """
                    Given an extracted chunk, load appropriate attributes from it.
                
                    """
                Severity: Minor
                Found in maicroft/social_info_extraction.py - About 1 day 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

                File searchtools.js has 478 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*
                 * searchtools.js_t
                 * ~~~~~~~~~~~~~~~~
                 *
                 * Sphinx JavaScript utilities for the full-text search.
                Severity: Minor
                Found in docs/_build/html/_static/searchtools.js - About 7 hrs to fix

                  Function performObjectSearch has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                  Open

                    performObjectSearch : function(object, otherterms) {
                      var filenames = this._index.filenames;
                      var objects = this._index.objects;
                      var objnames = this._index.objnames;
                      var titles = this._index.titles;
                  Severity: Minor
                  Found in docs/_build/html/_static/searchtools.js - About 6 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 query has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
                  Open

                    query : function(query) {
                      var i;
                      var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
                  
                      // stem the searchterms and add them to the correct list
                  Severity: Minor
                  Found in docs/_build/html/_static/searchtools.js - About 6 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 Stemmer has 151 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var Stemmer = function() {
                  
                    var step2list = {
                      ational: 'ate',
                      tional: 'tion',
                  Severity: Major
                  Found in docs/_build/html/_static/searchtools.js - About 6 hrs to fix

                    Function main has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def main():
                        # parse the command-line options and arguments
                        user, target, options = parse_cmd_line()
                    
                        # Check for package updates
                    Severity: Minor
                    Found in maicroft/words/most_used_words.py - About 5 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 Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jQuery.Callbacks = function( options ) {
                    
                        // Convert options from String-formatted to Object-formatted if needed
                        // (we check in cache first)
                        options = typeof options === "string" ?
                    Severity: Major
                    Found in docs/_build/html/_static/jquery-1.11.1.js - About 5 hrs to fix

                      Consider simplifying this complex logical expression.
                      Open

                                  if ( event.pageX == null && original.clientX != null ) {
                                      eventDoc = event.target.ownerDocument || document;
                                      doc = eventDoc.documentElement;
                                      body = eventDoc.body;
                      
                      
                      Severity: Critical
                      Found in docs/_build/html/_static/jquery-1.11.1.js - About 5 hrs to fix

                        Function query has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          query : function(query) {
                            var i;
                            var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
                        
                            // stem the searchterms and add them to the correct list
                        Severity: Major
                        Found in docs/_build/html/_static/searchtools.js - About 4 hrs to fix

                          File social_info_extraction.py has 350 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import datetime
                          try:
                              import urlparse
                          except (ImportError):
                              import urllib.parse as urlparse
                          Severity: Minor
                          Found in maicroft/social_info_extraction.py - About 4 hrs to fix

                            Function stemWord has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              this.stemWord = function (w) {
                                var stem;
                                var suffix;
                                var firstch;
                                var origword = w;
                            Severity: Major
                            Found in docs/_build/html/_static/searchtools.js - About 4 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language