nemesiscodex/openfonacide

View on GitHub

Showing 970 of 970 total issues

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

          hide: function() {
            module.verbose('Delaying hide event to ensure user intent');
            clearTimeout(module.timer);
            module.timer = setTimeout(module.hide, settings.delay.hide);
          }
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
static/components/dropdown.js on lines 1487..1491

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

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

        $combo = ($module.prev().find(selector.text).length > 0)
          ? $module.prev().find(selector.text)
          : $module.prev(),
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
static/components/dropdown.js on lines 242..244

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

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($nextItem.length === 0) {
                  module.verbose('Down key pressed but reached bottom of current menu');
                  return;
                }
                else {
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
static/components/dropdown.js on lines 612..625

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

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

                "establecimiento": $resource('establecimiento/:id', {
                    id: "@id"
                }, {
                    query: {
                        method: 'GET',
Severity: Major
Found in static/js/frontend.service.js and 1 other location - About 1 hr to fix
static/js/frontend.service.js on lines 23..36

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

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

          var
            transition = module.get.transition(),
            $transition = (transition == 'safe')
              ? $context
              : (transition == 'overlay' || module.othersActive())
Severity: Major
Found in static/components/sidebar.js and 1 other location - About 1 hr to fix
static/components/sidebar.js on lines 456..465

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

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($visibleItems.index( $nextItem ) < 0) {
                  module.verbose('Up key pressed but reached top of current menu');
                  return;
                }
                else {
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
static/components/dropdown.js on lines 634..647

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

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

                "prioridades": $resource('prioridades/:id', {
                    id: "@id"
                }, {
                    query: {
                        method: 'GET',
Severity: Major
Found in static/js/frontend.service.js and 1 other location - About 1 hr to fix
static/js/frontend.service.js on lines 9..22

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

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

          var
            transition = module.get.transition(),
            $transition = (transition == 'safe')
              ? $context
              : (transition === 'overlay' || module.othersActive())
Severity: Major
Found in static/components/sidebar.js and 1 other location - About 1 hr to fix
static/components/sidebar.js on lines 500..509

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

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

          $combo  = ($module.prev().find(selector.text).length > 0)
            ? $module.prev().find(selector.text)
            : $module.prev()
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
static/components/dropdown.js on lines 54..56

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

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

          show: function() {
            module.verbose('Delaying show event to ensure user intent');
            clearTimeout(module.timer);
            module.timer = setTimeout(module.show, settings.delay.show);
          },
Severity: Major
Found in static/components/dropdown.js and 1 other location - About 1 hr to fix
static/components/dropdown.js on lines 1492..1496

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

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 buildPath has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        buildPath : function (ctx, style) {
            var pointList = style.pointList;
            if (pointList.length < 2) {
                // 少于2个点就不画了~
                return;
Severity: Minor
Found in static/js/dncp/util/shape/HalfSmoothPolygon.js - About 1 hr to fix

    Function animate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            animate: function(overrideSettings) {
              settings = overrideSettings || settings;
              if(!module.is.supported()) {
                module.error(error.support);
                return false;
    Severity: Minor
    Found in static/components/transition.js - About 1 hr to fix

      Function kwargs has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function kwargs(func, defaults) {
              /*jshint maxlen : 200*/
              var removeComments = new RegExp('(\\/\\*[\\w\\\'\\,\\(\\)\\s\\r\\n\\*]*\\*\\/)|(\\/\\/[\\w\\s\\\'][^\\n\\r]*$)|(<![\\-\\-\\s\\w\\>\\/]*>)', 'gim');
              var removeWhitespc = new RegExp('\\s+', 'gim');
              var matchSignature = new RegExp('function.*?\\((.*?)\\)', 'i');
      Severity: Minor
      Found in static/js/dncp/util/kwargs.js - About 1 hr to fix

        Function _withPreprocess1 has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _withPreprocess1 : function (axis, out, funcWithAxis, funcFlatten) {
                var source = this._array;
                if (!this._size) {
                    return;
                }
        Severity: Minor
        Found in static/js/dncp/util/ndarray.js - About 1 hr to fix

          Function object has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                    object: function(searchTerm, source) {
                      var
                        results         = [],
                        fullTextResults = [],
                        searchFields    = $.isArray(settings.searchFields)
          Severity: Minor
          Found in static/components/search.js - About 1 hr to fix

            Function elementCalculations has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                      elementCalculations: function() {
                        var
                          screen     = module.get.screenCalculations(),
                          element    = module.get.elementPosition()
                        ;
            Severity: Minor
            Found in static/components/visibility.js - About 1 hr to fix

              Function text has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function text(zr, oldShape, newShape, duration, easing) {
                      if (!oldShape) {        // add
                          oldShape = {
                              style : {
                                  x : newShape.style.textAlign == 'left' 
              Severity: Minor
              Found in static/js/dncp/util/ecAnimation.js - About 1 hr to fix

                Function mean has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    mean : kwargs((function () {
                        function withAxis(data, source, offsetStride, axisSize, stride) {
                            var cursor = 0;
                            for (var offset = 0; offset < this._size; offset+=offsetStride) {
                                for (var i = 0; i < stride; i++) {
                Severity: Minor
                Found in static/js/dncp/util/ndarray.js - About 1 hr to fix

                  Function html has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            html: function(source, id, url) {
                              module.debug('Generating embed html');
                              var
                                html
                              ;
                  Severity: Minor
                  Found in static/components/video.js - About 1 hr to fix

                    Function generateResults has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            generateResults: function(response) {
                              module.debug('Generating html from response', response);
                              var
                                template       = settings.templates[settings.type],
                                isProperObject = ($.isPlainObject(response.results) && !$.isEmptyObject(response.results)),
                    Severity: Minor
                    Found in static/components/search.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language