Showing 122 of 122 total issues

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

      if(!this.depths[depth]) {
        this.depths[depth] = true;
        this.depths.list.push(depth);
      }
Severity: Minor
Found in vendor/assets/javascripts/handlebars.js and 1 other location - About 50 mins to fix
vendor/assets/javascripts/handlebars.js on lines 2436..2439

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(data) { 
                data.key = key; 
                data.index = i;
                data.first = (i === 0);
              }
Severity: Major
Found in vendor/assets/javascripts/handlebars.js - About 45 mins to fix

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

      __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
    Severity: Minor
    Found in vendor/assets/javascripts/handlebars.js - About 45 mins to fix

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

          var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {
      Severity: Minor
      Found in vendor/assets/javascripts/handlebars.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                              if (this.terminals_[p] && p > 2) {
                                  expected.push("'" + this.terminals_[p] + "'");
                              }
        Severity: Major
        Found in vendor/assets/javascripts/handlebars.js - About 45 mins to fix

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

            def down
              create_table :following_tags do |t|
                t.references :user, null: false, index: true
                t.references :tag, null: false, index: true
                t.foreign_key :users, dependent: :delete
          Severity: Minor
          Found in db/migrate/20140723040835_drop_table_following_tag.rb and 1 other location - About 45 mins to fix
          db/migrate/20140522094823_create_following_tags.rb on lines 2..12

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

          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 change
              create_table :following_tags do |t|
                t.references :user, null: false, index: true
                t.references :tag, null: false, index: true
                t.foreign_key :users, dependent: :delete
          Severity: Minor
          Found in db/migrate/20140522094823_create_following_tags.rb and 1 other location - About 45 mins to fix
          db/migrate/20140723040835_drop_table_following_tag.rb on lines 5..15

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

          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 BlockNode has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              BlockNode: function(mustache, program, inverse, close, locInfo) {
          Severity: Minor
          Found in vendor/assets/javascripts/handlebars.js - About 35 mins to fix

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

            var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
            Severity: Minor
            Found in vendor/assets/javascripts/handlebars.js - About 35 mins to fix

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

              var __module1__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
              Severity: Minor
              Found in vendor/assets/javascripts/handlebars.js - About 35 mins to fix

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

                    MustacheNode: function(rawParams, hash, open, strip, locInfo) {
                Severity: Minor
                Found in vendor/assets/javascripts/handlebars.js - About 35 mins to fix

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

                      create_table :stocks do |t|
                        t.references :user, null: false, index: true
                        t.references :article, null: false, index: true
                        t.foreign_key :users, dependent: :delete
                        t.foreign_key :articles, dependent: :delete
                  Severity: Minor
                  Found in db/migrate/20140413011016_create_stocks.rb and 1 other location - About 35 mins to fix
                  db/migrate/20140531004629_create_notification_targets.rb on lines 3..9

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

                  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

                  class CommentsControllerTest < ActionController::TestCase
                    test "should get create" do
                      get :create
                      assert_response :success
                    end
                  Severity: Minor
                  Found in test/controllers/comments_controller_test.rb and 1 other location - About 35 mins to fix
                  test/controllers/comment_controller_test.rb on lines 3..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 35.

                  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

                      create_table :notification_targets do |t|
                        t.references :user, null: false, index: true
                        t.references :notification, null: false, index: true
                        t.foreign_key :users, dependent: :delete
                        t.foreign_key :notifications, dependent: :delete
                  Severity: Minor
                  Found in db/migrate/20140531004629_create_notification_targets.rb and 1 other location - About 35 mins to fix
                  db/migrate/20140413011016_create_stocks.rb on lines 3..9

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

                  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

                      within('article') do
                        click_link I18n.t("articles.stock")
                        expect(page).to have_link I18n.t("articles.unstock")
                        expect(page).to have_link("1", exact: true)
                        within('.stock-users') do
                  Severity: Minor
                  Found in spec/features/stock_and_unstock_articles_spec.rb and 1 other location - About 35 mins to fix
                  spec/features/stock_and_unstock_articles_spec.rb on lines 38..43

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

                  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

                      within('article') do
                        click_link I18n.t("articles.unstock")
                        expect(page).to have_link I18n.t("articles.stock")
                        expect(page).to have_link("0", exact: true)
                        within('.stock-users') do
                  Severity: Minor
                  Found in spec/features/stock_and_unstock_articles_spec.rb and 1 other location - About 35 mins to fix
                  spec/features/stock_and_unstock_articles_spec.rb on lines 15..20

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

                  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

                  class CommentControllerTest < ActionController::TestCase
                    test "should get index" do
                      get :index
                      assert_response :success
                    end
                  Severity: Minor
                  Found in test/controllers/comment_controller_test.rb and 1 other location - About 35 mins to fix
                  test/controllers/comments_controller_test.rb on lines 3..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 35.

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

                      HashNode: function(pairs, locInfo) {
                        LocationInfo.call(this, locInfo);
                        this.type = "hash";
                        this.pairs = pairs;
                      },
                  Severity: Major
                  Found in vendor/assets/javascripts/handlebars.js and 3 other locations - About 35 mins to fix
                  vendor/assets/javascripts/handlebars.js on lines 665..669
                  vendor/assets/javascripts/handlebars.js on lines 720..724
                  vendor/assets/javascripts/handlebars.js on lines 749..753

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

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

                      CommentNode: function(comment, locInfo) {
                        LocationInfo.call(this, locInfo);
                        this.type = "comment";
                        this.comment = comment;
                      }
                  Severity: Major
                  Found in vendor/assets/javascripts/handlebars.js and 3 other locations - About 35 mins to fix
                  vendor/assets/javascripts/handlebars.js on lines 665..669
                  vendor/assets/javascripts/handlebars.js on lines 671..675
                  vendor/assets/javascripts/handlebars.js on lines 720..724

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

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

                      DataNode: function(id, locInfo) {
                        LocationInfo.call(this, locInfo);
                        this.type = "DATA";
                        this.id = id;
                      },
                  Severity: Major
                  Found in vendor/assets/javascripts/handlebars.js and 3 other locations - About 35 mins to fix
                  vendor/assets/javascripts/handlebars.js on lines 665..669
                  vendor/assets/javascripts/handlebars.js on lines 671..675
                  vendor/assets/javascripts/handlebars.js on lines 749..753

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

                  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