YuntechNet/AtomicP2P

View on GitHub

Showing 177 of 209 total issues

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

jQuery.parseHTML = function( data, context, keepScripts ) {
    if ( typeof data !== "string" ) {
        return [];
    }
    if ( typeof context === "boolean" ) {
Severity: Minor
Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

    Function off has 28 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
    Severity: Minor
    Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

      Function run has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def run(self) -> None:
              while not self.stopped.wait(self.loopDelay):
                  if self.pause is False:
                      no_response_list = []
                      for (host, peer_info) in self.peer.peer_pool.items():
      Severity: Minor
      Found in atomic_p2p/peer/monitor/__init__.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 __on_recv has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          def __on_recv(self, sock: "Socket", mask, **kwargs):
              """Method use when recieve socket data.
              This is 2th layer to process Packets.
              """
              try:
      Severity: Minor
      Found in atomic_p2p/peer/peer.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 when has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          when: function( singleValue ) {
              var
      
                  // count of uncompleted subordinates
                  remaining = arguments.length,
      Severity: Minor
      Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

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

            addClass: function( value ) {
                var classes, elem, cur, curValue, clazz, j, finalValue,
                    i = 0;
        
                if ( jQuery.isFunction( value ) ) {
        Severity: Minor
        Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

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

              clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                  var i, l, srcElements, destElements,
                      clone = elem.cloneNode( true ),
                      inPage = jQuery.contains( elem.ownerDocument, elem );
          
          
          Severity: Minor
          Found in docs/_static/jquery-3.2.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/_static/jquery-3.2.1.js - About 1 hr to fix

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

                  remove: function( owner, key ) {
                      var i,
                          cache = owner[ this.expando ];
              
                      if ( cache === undefined ) {
              Severity: Minor
              Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

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

                function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
                    var i,
                        val = 0;
                
                    // If we already have the right measurement, avoid augmentation
                Severity: Minor
                Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                      if ( support.matchesSelector && documentIsHTML &&
                          !compilerCache[ expr + " " ] &&
                          ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                          ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
                  
                  
                  Severity: Major
                  Found in docs/_static/jquery-3.2.1.js - About 1 hr to fix

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

                        def __init__(
                    Severity: Major
                    Found in atomic_p2p/peer/peer.py - About 1 hr to fix

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

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

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

                        def main(role, addr, target, name, cert, ns, domain):
                        Severity: Major
                        Found in run.py - About 50 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ( nodeType === 9 ) {
                                                  if ( (elem = context.getElementById( m )) ) {
                          
                                                      // Support: IE, Opera, Webkit
                                                      // TODO: identify versions
                          Severity: Major
                          Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                                if ( ofType ?
                                                                    node.nodeName.toLowerCase() === name :
                                                                    node.nodeType === 1 ) {
                            
                                                                    return false;
                            Severity: Major
                            Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
                                                              return true;
                                                          }
                              Severity: Major
                              Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        for ( match in context ) {
                                
                                                            // Properties of context are called as methods if possible
                                                            if ( jQuery.isFunction( this[ match ] ) ) {
                                                                this[ match ]( context[ match ] );
                                Severity: Major
                                Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          for ( type in data.events ) {
                                                              if ( special[ type ] ) {
                                                                  jQuery.event.remove( elem, type );
                                  
                                                              // This is a shortcut to avoid jQuery.event.remove's overhead
                                  Severity: Major
                                  Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
                                                                cur = cur.replace( " " + clazz + " ", " " );
                                                            }
                                    Severity: Major
                                    Found in docs/_static/jquery-3.2.1.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language