ThibaultMontaufray/Droid-Image

View on GitHub

Showing 429 of 903 total issues

Avoid deeply nested control flow statements.
Open

                    if ( hasScripts ) {

                        // Support: Android <=4.0 only, PhantomJS 1 only
                        // push.apply(_, arraylike) throws on ancient WebKit
                        jQuery.merge( scripts, getAll( node, "script" ) );
Severity: Major
Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ( matches[ sel ] ) {
                                matches.push( handleObj );
                            }
    Severity: Major
    Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

      Method SetBrightness has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
      Open

              public void SetBrightness(int brightness)
              {
                  Bitmap bmap = new Bitmap(_currentBitmap.Width, _currentBitmap.Height);
                  if (brightness < -255) brightness = -255;
                  if (brightness > 255) brightness = 255;
      Severity: Minor
      Found in Project/Droid.Image/Controler/ImageHandler.cs - About 45 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

      Avoid deeply nested control flow statements.
      Open

                          if ( rscriptType.test( node.type || "" ) &&
                              !dataPriv.access( node, "globalEval" ) &&
                              jQuery.contains( doc, node ) ) {
      
                              if ( node.src ) {
      Severity: Major
      Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

        Method SetContrast has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring.
        Open

                public void SetContrast(double contrast)
                {
                    Bitmap bmap = new Bitmap(_currentBitmap.Width, _currentBitmap.Height);
                    if (contrast < -100) contrast = -100;
                    if (contrast > 100) contrast = 100;
        Severity: Minor
        Found in Project/Droid.Image/Controler/ImageHandler.cs - About 45 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

        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 Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      for (int y2 = ApetureMin; y2 < ApetureMax; ++y2)
                                      {
                                          int TempY = y + y2;
                                          if (TempY >= 0 && TempY < NewBitmap.Height)
                                          {
          Severity: Major
          Found in Project/Droid.Image/Controler/Interface_image.cs - 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 Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

              Method InsertShape has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public void InsertShape(string shapeType, int xPosition, int yPosition, int width, int height, string colorName)
              Severity: Minor
              Found in Project/Droid.Image/Controler/ImageHandler.cs - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if ( conv && s.throws ) {
                                        response = conv( response );
                                    } else {
                                        try {
                                            response = conv( response );
                Severity: Major
                Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.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 Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if ( !selector ) {
                                            push.apply( results, seed );
                                            return results;
                                        }
                    Severity: Major
                    Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                  for (int y2 = ApetureMin; y2 < ApetureMax; ++y2)
                                                  {
                                                      int TempY = y + y2;
                                                      if (TempY >= 0 && TempY < NewBitmap.Height)
                                                      {
                      Severity: Major
                      Found in Project/Droid.Image/Controler/Interface_image.cs - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                    if (TempX >= 0 && TempX < NewBitmap.Width)
                                                    {
                                                        for (int y2 = ApetureMinY[i]; y2 < ApetureMaxY[i]; ++y2)
                                                        {
                                                            int TempY = y + y2;
                        Severity: Major
                        Found in Project/Droid.Image.UI/Interface_image.cs - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( nid === expando ) {
                                                      context.removeAttribute( "id" );
                                                  }
                          Severity: Major
                          Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        for (int y2 = ApetureMin; y2 < ApetureMax; ++y2)
                                                        {
                                                            int TempY = y + y2;
                                                            if (TempY >= 0 && TempY < NewBitmap.Height)
                                                            {
                            Severity: Major
                            Found in Project/Droid.Image.UI/Interface_image.cs - 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 Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            for (int y2 = ApetureMin; y2 < ApetureMax; ++y2)
                                                            {
                                                                int TempY = y + y2;
                                                                if (TempY >= 0 && TempY < NewBitmap.Height)
                                                                {
                                Severity: Major
                                Found in Project/Droid.Image.UI/Interface_image.cs - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if (TempX >= 0 && TempX < NewBitmap.Width)
                                                              {
                                                                  for (int y2 = ApetureMinY[i]; y2 < ApetureMaxY[i]; ++y2)
                                                                  {
                                                                      int TempY = y + y2;
                                  Severity: Major
                                  Found in Project/Droid.Image/Controler/Interface_image.cs - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                        if ( ( ofType ?
                                                                            node.nodeName.toLowerCase() === name :
                                                                            node.nodeType === 1 ) &&
                                                                            ++diff ) {
                                    
                                    
                                    Severity: Major
                                    Found in Project/Droid.Image.UI/Scripts/jquery-3.0.0.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language