nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

              $document
                .on('touchstart' + elementNamespace, module.event.test.touch)
                .on('touchmove'  + elementNamespace, module.event.test.touch)
Severity: Minor
Found in static/components/dropdown.js and 1 other location - About 50 mins to fix
static/components/search.js on lines 82..84

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 51.

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

              else if(source == 'youtube') {
                html = ''
                  + '<iframe src="//www.youtube.com/embed/' + id + '?=' + module.generate.url(source) + '"'
                  + ' width="100%" height="100%"'
                  + ' frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'
Severity: Minor
Found in static/components/video.js and 1 other location - About 50 mins to fix
static/components/video.js on lines 206..219

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 51.

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

                else {
                    self.nextItem = self.currentItem;
                    self.currentItem = self.prevItem;
                    if( incomingItem ) {
                        self.prevItem = incomingItem;
Severity: Minor
Found in static/js/cbpGridGallery.js and 1 other location - About 50 mins to fix
static/js/cbpGridGallery.js on lines 251..257

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 51.

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

                if( dir === 'next' ) {
                    self.prevItem = self.currentItem;
                    self.currentItem = self.nextItem;
                    if( incomingItem ) {
                        self.nextItem = incomingItem;
Severity: Minor
Found in static/js/cbpGridGallery.js and 1 other location - About 50 mins to fix
static/js/cbpGridGallery.js on lines 258..264

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 51.

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

          $results
            .on('mousedown' + eventNamespace, module.event.result.mousedown)
            .on('mouseup' + eventNamespace, module.event.result.mouseup)
Severity: Minor
Found in static/components/search.js and 1 other location - About 50 mins to fix
static/components/dropdown.js on lines 383..385

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 51.

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

Avoid deeply nested control flow statements.
Open

                            if (isScalar) {
                                data[i*stride + j + offset] = source;
                            } else {
                                data[i*stride + j + offset] = source[cursor++];
                            }
Severity: Major
Found in static/js/dncp/util/ndarray.js - About 45 mins to fix

    Function icon has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function icon(zr, oldShape, newShape, duration, easing, delay) {
    Severity: Minor
    Found in static/js/dncp/util/ecAnimation.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              switch (op) {
                                  case E_ADD: res = _a + _b; break;
                                  case E_SUB: res = _a - _b; break;
                                  case E_MUL: res = _a * _b; break;
                                  case E_DIV: res = _a / _b; break;
      Severity: Major
      Found in static/js/dncp/util/ndarray.js - About 45 mins to fix

        Function get_options_bar has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function get_options_bar(titulo, subtitulo, legendData, legendSelected, categoryData, series){
        Severity: Minor
        Found in static/js/frontend.ResumenController.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                      } else if (_value != _href()) {
                                          if (_opts.history) {
                                              _l.hash = '#' + _value;
                                          } else {
                                              _l.replace('#' + _value);
          Severity: Major
          Found in static/js/jquery.address.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    switch (op) {
                                        case E_ADD: res = _a + _b; break;
                                        case E_SUB: res = _a - _b; break;
                                        case E_MUL: res = _a * _b; break;
                                        case E_DIV: res = _a / _b; break;
            Severity: Major
            Found in static/js/dncp/util/ndarray.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if (_opts.history) {
                                                  _l.hash = '#' + _value;
                                              } else {
                                                  _l.replace('#' + _value);
                                              }
              Severity: Major
              Found in static/js/jquery.address.js - About 45 mins to fix

                Function mapa has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                function mapa (datos) {
                
                
                
                function changeData(data, tipo_abastecimiento){
                Severity: Minor
                Found in static/js/agua.js - 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 (isScalar) {
                                                data[i*stride + j + offset] = source;
                                            } else {
                                                data[i*stride + j + offset] = source[cursor++];
                                            }
                Severity: Major
                Found in static/js/dncp/util/ndarray.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          switch (op) {
                                              case E_ADD: res = _a + _b; break;
                                              case E_SUB: res = _a - _b; break;
                                              case E_MUL: res = _a * _b; break;
                                              case E_DIV: res = _a / _b; break;
                  Severity: Major
                  Found in static/js/dncp/util/ndarray.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            switch (op) {
                                                case E_ADD: res = _a + _b; break;
                                                case E_SUB: res = _a - _b; break;
                                                case E_MUL: res = _a * _b; break;
                                                case E_DIV: res = _a / _b; break;
                    Severity: Major
                    Found in static/js/dncp/util/ndarray.js - About 45 mins to fix

                      Function tryForInt has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function tryForInt(min, max, section, expMin, expMax, secs) {
                      Severity: Minor
                      Found in static/js/dncp/util/smartSteps.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if(isChecked) {
                                              values[name] = true;
                                            }
                                            else {
                                              module.debug('Omitted unchecked checkbox', $field);
                        Severity: Major
                        Found in static/components/form.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                        if(settings.pushing) {
                                          if(module.is.bound() && scroll.bottom < context.bottom ) {
                                            module.debug('Fixing bottom attached element to bottom of browser.');
                                            module.fixBottom();
                                          }
                          Severity: Major
                          Found in static/components/sticky.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if(response && response.error !== undefined) {
                                                      errorMessage = response.error;
                                                    }
                            Severity: Major
                            Found in static/components/api.js - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language