YuntechNet/AtomicP2P

View on GitHub

Showing 209 of 209 total issues

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

/*!
 * jQuery JavaScript Library v3.2.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in docs/_static/jquery-3.2.1.js - About 2 wks to fix

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

    (function( window ) {
    
    var i,
        support,
        Expr,
    Severity: Major
    Found in docs/_static/jquery-3.2.1.js - About 1 wk 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/_static/underscore-1.3.1.js - About 1 day to fix

        Function ajax has 251 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/_static/jquery-3.2.1.js - About 1 day to fix

          Function setDocument has 245 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          setDocument = Sizzle.setDocument = function( node ) {
              var hasCompare, subWindow,
                  doc = node ? node.ownerDocument || node : preferredDoc;
          
              // Return early if doc is invalid or already selected
          Severity: Major
          Found in docs/_static/jquery-3.2.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/_static/language_data.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 Deferred has 176 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Deferred: function( func ) {
                    var tuples = [
            
                            // action, add listener, callbacks,
                            // ... .then handlers, argument index, [final state]
            Severity: Major
            Found in docs/_static/jquery-3.2.1.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 docnames = this._index.docnames;
                  var objects = this._index.objects;
                  var objnames = this._index.objnames;
              Severity: Minor
              Found in docs/_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 43 (exceeds 5 allowed). Consider refactoring.
              Open

                query : function(query) {
                  var i;
              
                  // stem the searchterms and add them to the correct list
                  var stemmer = new Stemmer();
              Severity: Minor
              Found in docs/_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/_static/language_data.js - About 6 hrs to fix

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

                  performTermsSearch : function(searchterms, excluded, terms, titleterms) {
                    var docnames = this._index.docnames;
                    var filenames = this._index.filenames;
                    var titles = this._index.titles;
                
                
                Severity: Minor
                Found in docs/_static/searchtools.js - 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 defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function defaultPrefilter( elem, props, opts ) {
                    var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
                        isBox = "width" in props || "height" in props,
                        anim = this,
                        orig = {},
                Severity: Major
                Found in docs/_static/jquery-3.2.1.js - About 4 hrs to fix

                  Function Callbacks has 121 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/_static/jquery-3.2.1.js - About 4 hrs to fix

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

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

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

                        query : function(query) {
                          var i;
                      
                          // stem the searchterms and add them to the correct list
                          var stemmer = new Stemmer();
                      Severity: Major
                      Found in docs/_static/searchtools.js - 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/_static/language_data.js - About 4 hrs to fix

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          class PauseCmd(Command):
                              """PauseCmd
                                  pause monitor keep checking peers.
                                  Usage in prompt: monitor pause
                              """
                          Severity: Major
                          Found in atomic_p2p/peer/monitor/command.py and 1 other location - About 4 hrs to fix
                          atomic_p2p/peer/monitor/command.py on lines 117..130

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 78.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          class VerboseCmd(Command):
                              """VerboseCmd
                                  toggle verbose flag in monitor to output more detail or not.
                                  Usage in prompt: monitor verbose
                              """
                          Severity: Major
                          Found in atomic_p2p/peer/monitor/command.py and 1 other location - About 4 hrs to fix
                          atomic_p2p/peer/monitor/command.py on lines 35..48

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 78.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Function then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                          then: function( onFulfilled, onRejected, onProgress ) {
                                              var maxDepth = 0;
                                              function resolve( depth, deferred, handler, special ) {
                                                  return function() {
                                                      var that = this,
                          Severity: Major
                          Found in docs/_static/jquery-3.2.1.js - About 4 hrs to fix

                            Function Animation has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function Animation( elem, properties, options ) {
                                var result,
                                    stopped,
                                    index = 0,
                                    length = Animation.prefilters.length,
                            Severity: Major
                            Found in docs/_static/jquery-3.2.1.js - About 3 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language