laboiteproject/lenuage

View on GitHub

Showing 179 of 384 total issues

Avoid too many return statements within this function.
Open

                    return results;
Severity: Major
Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
    Severity: Major
    Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return compare & 4 ? -1 : 1;
      Severity: Major
      Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return false
        Severity: Major
        Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                        return values[1];
          Severity: Major
          Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                return results;
            Severity: Major
            Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return sortInput ?
                              ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
                              0;
              Severity: Major
              Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return root.ready !== undefined ?
                                root.ready( selector ) :
                
                                // Execute immediately if ready is not present
                                selector( jQuery );
                Severity: Major
                Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return jQuery.makeArray( selector, this );
                  Severity: Major
                  Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                    return this.constructor( context ).find( selector );
                    Severity: Major
                    Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return value;
                      Severity: Major
                      Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return ret;
                        Severity: Major
                        Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return elem[ name ];
                          Severity: Major
                          Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return this;
                            Severity: Major
                            Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return ret == null ? undefined : ret;
                              Severity: Major
                              Found in static/dist/js/site-70bd78197e.js - About 30 mins to fix

                                Function get_context_data has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def get_context_data(self, **kwargs):
                                        context = super(TileUpdateView, self).get_context_data(**kwargs)
                                        context['boite'] = self.object.boite
                                        context['boite_id'] = self.object.boite.id
                                
                                
                                Severity: Minor
                                Found in boites/views.py - About 25 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

                                Function get_apps_dictionary has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def get_apps_dictionary(self):
                                        apps_dict = {}
                                        for model in apps.get_models():
                                            if issubclass(model, App):
                                                applications = model.objects.filter(boite=self, enabled=True)
                                Severity: Minor
                                Found in boites/models.py - About 25 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

                                Function draw has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function draw(x0, y0, bitmap, width, height, color, bg) {
                                    for(var y = 0; y <= bitmap.length/height+1; y++) {
                                        for(var x = 0; x <= width-1; x++) {
                                            if(bitmap[x+y*width]==1)
                                                drawPixel(x+x0, y+y0, color);
                                Severity: Minor
                                Found in laboite/static/js/gfx.js - About 25 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

                                Function drawHex has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                function drawHex(x0, y0, hex_bitmap, width, height, color, bg) {
                                    bitmap = hexToBinary(hex_bitmap);
                                    for(var y = 0; y <= bitmap.length/height+1; y++) {
                                        for(var x = 0; x <= width-1; x++) {
                                            if(bitmap[x+y*width]==1)
                                Severity: Minor
                                Found in laboite/static/js/gfx.js - About 25 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

                                Severity
                                Category
                                Status
                                Source
                                Language