hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

  neutralRating: function() {
    return (this.get('rating') > 2.4 && this.get('rating') < 3.6);
  }.property('rating'),
Severity: Minor
Found in frontend/app/models/library-entry.js and 1 other location - About 40 mins to fix
frontend/app/models/manga-library-entry.js on lines 24..26

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

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

case 22: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 31; 
break;
Severity: Minor
Found in app/assets/javascripts/old/handlebars-1.0.0.js and 1 other location - About 40 mins to fix
app/assets/javascripts/old/handlebars-1.0.0.js on lines 639..640

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

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

case 23: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\'/g,"'"); return 31; 
break;
Severity: Minor
Found in app/assets/javascripts/old/handlebars-1.0.0.js and 1 other location - About 40 mins to fix
app/assets/javascripts/old/handlebars-1.0.0.js on lines 637..638

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

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

case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]); 
break;
Severity: Minor
Found in app/assets/javascripts/old/handlebars-1.0.0.js and 1 other location - About 40 mins to fix
app/assets/javascripts/old/handlebars-1.0.0.js on lines 228..229

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

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

  def destroy
    authenticate_user!
    params.require(:id)
    story = Story.find_by(id: params[:id])

Severity: Minor
Found in app/controllers/stories_controller.rb and 1 other location - About 40 mins to fix
app/controllers/substories_controller.rb on lines 36..52

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

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

  def destroy
    authenticate_user!
    params.require(:id)
    substory = Substory.find_by(id: params[:id])

Severity: Minor
Found in app/controllers/substories_controller.rb and 1 other location - About 40 mins to fix
app/controllers/stories_controller.rb on lines 62..78

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

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

Consider simplifying this complex logical expression.
Open

    if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
      params.contentType = 'application/json';
      params.data = JSON.stringify(options.attrs || model.toJSON(options));
    }
Severity: Major
Found in app/assets/javascripts/old/backbone-1.0.0.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                if(
                    inst.options.greedy &&
                    !inst.options.disabled &&
                    inst.options.scope === draggable.options.scope &&
                    inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
    Severity: Major
    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                  if ( ( this.options.values.length === 2 && this.options.range === true ) &&
                          ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
                      ) {
                      newVal = otherVal;
                  }
      Severity: Major
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if ( tab.hasClass( "ui-state-disabled" ) ||
                        // tab is already loading
                        tab.hasClass( "ui-tabs-loading" ) ||
                        // can't switch durning an animation
                        this.running ||
        Severity: Major
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                similar_anime.push(sim) if sim &&
                                           similar_anime.length < limit &&
                                           (!self.sfw? || (self.sfw? && sim.sfw?)) &&
                                           !exclude.include?(sim)
          Severity: Major
          Found in app/models/anime.rb - About 40 mins to fix

            Function init has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                init : function (scope, libraries, method, options, response) {
            Severity: Minor
            Found in public/2013/assets/js/foundation/foundation.js - About 35 mins to fix

              Function ho has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  ho: function(val, cx, partials, text, tags) {
              Severity: Minor
              Found in app/assets/javascripts/old/hogan-2.0.0.js - About 35 mins to fix

                Function _dialogDatepicker has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                Severity: Minor
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 35 mins to fix

                  Function init has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      init : function (scope, libraries, method, options, response) {
                  Severity: Minor
                  Found in public/2014/assets/js/foundation/foundation.js - About 35 mins to fix

                    Function substituteTimeAgo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) {
                    Severity: Minor
                    Found in app/assets/javascripts/old/moment.js - About 35 mins to fix

                      Function popEmberData has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        popEmberData: function(key, path, object, store, edQuery) {
                      Severity: Minor
                      Found in frontend/app/utils/preload-store.js - About 35 mins to fix

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

                        case 29: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 
                        break;
                        Severity: Minor
                        Found in app/assets/javascripts/old/handlebars-1.0.0.js and 2 other locations - About 35 mins to fix
                        app/assets/javascripts/old/handlebars-1.0.0.js on lines 214..215
                        app/assets/javascripts/old/handlebars-1.0.0.js on lines 273..274

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

                        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 3 locations. Consider refactoring.
                        Open

                        case 37: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 
                        break;
                        Severity: Minor
                        Found in app/assets/javascripts/old/handlebars-1.0.0.js and 2 other locations - About 35 mins to fix
                        app/assets/javascripts/old/handlebars-1.0.0.js on lines 214..215
                        app/assets/javascripts/old/handlebars-1.0.0.js on lines 257..258

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

                        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 3 locations. Consider refactoring.
                        Open

                        case 9: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 
                        break;
                        Severity: Minor
                        Found in app/assets/javascripts/old/handlebars-1.0.0.js and 2 other locations - About 35 mins to fix
                        app/assets/javascripts/old/handlebars-1.0.0.js on lines 257..258
                        app/assets/javascripts/old/handlebars-1.0.0.js on lines 273..274

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

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language