dotledger/dotledger

View on GitHub
app/assets/javascripts/dot_ledger/routers/app.js

Summary

Maintainability
F
1 wk
Test Coverage

File app.js has 694 lines of code (exceeds 250 allowed). Consider refactoring.
Open

DotLedger.module('Routers', function () {
  var routes;
  routes = {
    // Root
    '': 'root',
Severity: Major
Found in app/assets/javascripts/dot_ledger/routers/app.js - About 1 day to fix

    Function showAccount has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        showAccount: function (accountID) {
          var account, balanceGraph, show, transactions, updateTransactions;
    
          if (!this.QueryParams.has('tab')) {
            this.QueryParams.set({
    Severity: Major
    Found in app/assets/javascripts/dot_ledger/routers/app.js - About 3 hrs to fix

      Function incomeAndExpenses has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          incomeAndExpenses: function () {
            var categoryStatistics, filterView, renderReport, reportView;
            DotLedger.title('Reports', 'Income and Expenses');
            if (!this.QueryParams.has('period')) {
              this.QueryParams.set({
      Severity: Major
      Found in app/assets/javascripts/dot_ledger/routers/app.js - About 2 hrs to fix

        Function search has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            search: function () {
              var searchFilters, searchLayout, searchResults, searchSummary, transactions, updateTransactions;
              if (!this.QueryParams.has('page')) {
                this.QueryParams.set({
                  page: 1
        Severity: Minor
        Found in app/assets/javascripts/dot_ledger/routers/app.js - About 1 hr to fix

          Function root has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              root: function () {
                var accounts, categoryStatistics, categoryTypeStatistics, dashboard;
                DotLedger.title('Dashboard');
                dashboard = new DotLedger.Views.Application.Dashboard();
          
          
          Severity: Minor
          Found in app/assets/javascripts/dot_ledger/routers/app.js - About 1 hr to fix

            Function listAccounts has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                listAccounts: function () {
                  var activeAccounts, archivedAccounts;
                  DotLedger.title('Accounts');
            
                  list = new DotLedger.Views.Accounts.List();
            Severity: Minor
            Found in app/assets/javascripts/dot_ledger/routers/app.js - About 1 hr to fix

              Function listSortingRules has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  listSortingRules: function () {
                    var list, sortingRules, updateSortingRules;
                    if (!this.QueryParams.has('page')) {
                      this.QueryParams.set({
                        page: 1
              Severity: Minor
              Found in app/assets/javascripts/dot_ledger/routers/app.js - About 1 hr to fix

                Function listPayments has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    listPayments: function () {
                      var balanceGraph, list, payments, paymentsView;
                      this.QueryParams.on('change', _.bind(function () {
                        DotLedger.navigate.listPayments(this.QueryParams.attributes, {
                          replace: true
                Severity: Minor
                Found in app/assets/javascripts/dot_ledger/routers/app.js - About 1 hr to fix

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

                      editSavedSearch: function (savedSearchID) {
                        var savedSearch, form;
                        savedSearch = new DotLedger.Models.SavedSearch({
                          id: savedSearchID
                        });
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 2 other locations - About 6 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 554..573
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 605..624

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

                  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

                      editPayment: function (paymentID) {
                        var form, payment;
                        payment = new DotLedger.Models.Payment({
                          id: paymentID
                        });
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 2 other locations - About 6 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 605..624
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 656..675

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

                  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

                      editAccountGroup: function (accountGroupID) {
                        var accountGroup, form;
                        accountGroup = new DotLedger.Models.AccountGroup({
                          id: accountGroupID
                        });
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 2 other locations - About 6 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 554..573
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 656..675

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

                  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

                      newPayment: function () {
                        var form, payment;
                        payment = new DotLedger.Models.Payment();
                        DotLedger.title('New Payment');
                        form = new DotLedger.Views.Payments.Form({
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 590..603

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

                  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

                      newAccountGroup: function () {
                        var accountGroup, form;
                        accountGroup = new DotLedger.Models.AccountGroup();
                        DotLedger.title('New Account Group');
                        form = new DotLedger.Views.AccountGroups.Form({
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 4 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 539..552

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

                  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

                      listCategories: function () {
                        var categories;
                        categories = new DotLedger.Collections.Categories();
                        DotLedger.title('Categories');
                        categories.fetch({
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 3 other locations - About 4 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 493..506
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 575..588
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 626..639

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

                  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

                      listGoals: function () {
                        var goals;
                        goals = new DotLedger.Collections.Goals();
                        DotLedger.title('Goals');
                        goals.fetch({
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 3 other locations - About 4 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 370..383
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 575..588
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 626..639

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

                  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

                      listAccountGroups: function () {
                        var accountGroups;
                        accountGroups = new DotLedger.Collections.AccountGroups();
                        DotLedger.title('Account Groups');
                        accountGroups.fetch({
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 3 other locations - About 4 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 370..383
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 493..506
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 626..639

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

                  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

                      listSavedSearches: function () {
                        var savedSearches;
                        savedSearches = new DotLedger.Collections.SavedSearches();
                        DotLedger.title('Saved Searches');
                        savedSearches.fetch({
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 3 other locations - About 4 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 370..383
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 493..506
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 575..588

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

                  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

                        categoryTypeStatistics.fetch({
                          success: function () {
                            var activity;
                            activity = new DotLedger.Views.Statistics.ActivityPerCategoryType.List({
                              collection: categoryTypeStatistics
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 72..80

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

                  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

                        categoryStatistics.fetch({
                          success: function () {
                            var activity;
                            activity = new DotLedger.Views.Statistics.ActivityPerCategory.List({
                              collection: categoryStatistics
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 2 hrs to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 86..94

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

                  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

                        transactions.on('page:change', _.bind(function (page) {
                          this.QueryParams.set({
                            page: page
                          });
                          DotLedger.navigate.search(this.QueryParams.attributes);
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 447..452

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

                  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

                        sortingRules.on('page:change', _.bind(function (page) {
                          this.QueryParams.set({
                            page: page
                          });
                          DotLedger.navigate.listSortingRules(this.QueryParams.attributes);
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 690..695

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

                  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

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

                        form.on('save', function (model) {
                          DotLedger.navigate.listSortingRules({}, {
                            trigger: true
                          });
                          DotLedger.Helpers.SortTransactions.sort();
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 462..467

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

                  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

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

                        form.on('save', function (model) {
                          DotLedger.navigate.listSortingRules({}, {
                            trigger: true
                          });
                          DotLedger.Helpers.SortTransactions.sort();
                  Severity: Major
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 479..484

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

                  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 'unsorted':
                              transactions.fetch({
                                data: {
                                  account_id: accountID,
                                  unsorted: true,
                  Severity: Minor
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 45 mins to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 211..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 50.

                  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 'review':
                              transactions.fetch({
                                data: {
                                  account_id: accountID,
                                  review: true,
                  Severity: Minor
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 45 mins to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 220..228

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

                  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

                            data: {
                              date_to: DotLedger.Helpers.Format.queryDate(dateTo),
                              date_from: DotLedger.Helpers.Format.queryDate(dateFrom)
                            },
                  Severity: Minor
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 40 mins to fix
                  app/assets/javascripts/dot_ledger/views/payments/projected_balance_graph.js on lines 35..38

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

                  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

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

                        form.on('save', function () {
                          DotLedger.navigate.showAccount({
                            id: accountID
                          }, {
                            trigger: true
                  Severity: Minor
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 30 mins to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 313..319

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

                  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

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

                        form.on('save', function () {
                          DotLedger.navigate.showAccount({
                            id: accountID
                          }, {
                            trigger: true
                  Severity: Minor
                  Found in app/assets/javascripts/dot_ledger/routers/app.js and 1 other location - About 30 mins to fix
                  app/assets/javascripts/dot_ledger/routers/app.js on lines 338..344

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

                  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

                  There are no issues that match your filters.

                  Category
                  Status