catarse/catarse.js

View on GitHub

Showing 1,380 of 1,380 total issues

Function onSubmit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            onSubmit = () => {
                loading(true);
                m.redraw();
                vm.uploadImage(vnode.attrs.projectId).then(() => {
                    vm.updateProject(vnode.attrs.projectId).then(() => {
Severity: Minor
Found in legacy/src/c/project-card-edit.js - About 1 hr to fix

    Function sendReport has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                sendReport = (validateFunction) => {
                    if (!validateFunction()) {
                        return false;
                    }
                    submitDisabled(true);
    Severity: Minor
    Found in legacy/src/c/project-report.js - About 1 hr to fix

      Function lookup has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        I18n.lookup = function(scope, options) {
          options = this.prepareOptions(options);
      
          var locales = this.locales.get(options.locale).slice()
            , requestedLocale = locales[0]
      Severity: Minor
      Found in legacy/spec/lib/i18n/i18n.js - About 1 hr to fix

        Function loadRewards has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                async function loadRewards() {
        
                    await rewardVM.fetchRewards(attrs.project_id)
        
                    rewards([]);
        Severity: Minor
        Found in legacy/src/c/projects/edit/rewards-edit-list.tsx - About 1 hr to fix

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

                  it('should show redo payment credit card and cancel buttons', function() {
                      expect(redoPaymentButton.contains('Refazer pagamento')).toBeTruthy();
                      expect(redoPaymentButton.contains('Cancelar assinatura')).toBeTruthy();
                  });
          legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
          legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
          legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
          legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
          legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

          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

                  vnode.state = {
                      listVM,
                      filterVM,
                      groupedCollection,
                      lContributionsStats,
          Severity: Major
          Found in legacy/src/c/project-contributions.js and 2 other locations - About 1 hr to fix
          legacy/src/c/admin-balance-transfer-item-detail.js on lines 77..87
          legacy/src/root/projects-contribution-report.js on lines 267..277

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

          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

                  vnode.state = {
                      listVM,
                      filterVM,
                      filterBuilder,
                      submit,
          Severity: Major
          Found in legacy/src/root/projects-contribution-report.js and 2 other locations - About 1 hr to fix
          legacy/src/c/admin-balance-transfer-item-detail.js on lines 77..87
          legacy/src/c/project-contributions.js on lines 86..96

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

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

                  it('should show generate second slip and cancel buttons for active subscription', function() {
                      expect(activeSubscriptionExpiredSlip.contains('Gerar segunda via')).toBeTruthy();
                      expect(activeSubscriptionExpiredSlip.contains('Cancelar assinatura')).toBeTruthy();
                  });
          legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
          legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
          legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
          legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
          legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

          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

              it('should render the slip iframe if slip payment', () => {
                  expect($slip.has('iframe.slip')).toBeTrue();
                  expect($cc.has('iframe.slip')).toBeFalse();
              });
          Severity: Major
          Found in legacy/spec/components/root/thank-you.spec.js and 2 other locations - About 1 hr to fix
          legacy/spec/components/admin-transaction.spec.js on lines 21..24
          legacy/spec/components/root/projects-payment.spec.js on lines 56..60

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

          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

                  it('should render details about contribution', () => {
                      expect($output.contains('Valor: R$50,00')).toBeTrue();
                      expect($output.contains('Meio: MoIP')).toBeTrue();
                  });
          Severity: Major
          Found in legacy/spec/components/admin-transaction.spec.js and 2 other locations - About 1 hr to fix
          legacy/spec/components/root/projects-payment.spec.js on lines 56..60
          legacy/spec/components/root/thank-you.spec.js on lines 45..48

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

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

                  it('should show edit and cancel subscription buttons paid payment', function() {
                      expect(activeSubscriptionWithPaidPayment.contains('Editar assinatura')).toBeTruthy();
                      expect(activeSubscriptionWithPaidPayment.contains('Cancelar assinatura')).toBeTruthy();
                  });
          legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
          legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
          legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
          legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
          legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

                  it('should show print slip and cancel buttons for active subscription', function() {
                      expect(activeSubscriptionNotExpiredSlip.contains('Imprimir boleto')).toBeTruthy();
                      expect(activeSubscriptionNotExpiredSlip.contains('Cancelar assinatura')).toBeTruthy();
                  });        
          legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
          legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
          legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
          legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
          legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88

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

          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

                  vnode.state = {
                      metaBank,
                      userBankAccount,
                      transitionBankAccount,
                      userBalance,
          Severity: Major
          Found in legacy/src/c/admin-balance-transfer-item-detail.js and 2 other locations - About 1 hr to fix
          legacy/src/c/project-contributions.js on lines 86..96
          legacy/src/root/projects-contribution-report.js on lines 267..277

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

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

                  it('should show print slip and cancel buttons', function() {
                      expect(printSecondSlipButton.contains('Imprimir boleto')).toBeTruthy();
                      expect(printSecondSlipButton.contains('Cancelar assinatura')).toBeTruthy();
                  });
          legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
          legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
          legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
          legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
          legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

                  it('should show redo payment and cancel subscription buttons', function() {
                      expect(activeSubscriptionLastPaymentRefused.contains('Refazer pagamento')).toBeTruthy();
                      expect(activeSubscriptionLastPaymentRefused.contains('Cancelar assinatura')).toBeTruthy();
                  });
          legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
          legacy/spec/components/user-subscription-box-control.spec.js on lines 46..49
          legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
          legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
          legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

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

                  it('should show generate second slip and cancel buttons', function() {
                      expect(generateSecondSlipButton.contains('Gerar segunda via')).toBeTruthy();
                      expect(generateSecondSlipButton.contains('Cancelar assinatura')).toBeTruthy();
                  });
          legacy/spec/components/user-subscription-box-control.spec.js on lines 41..44
          legacy/spec/components/user-subscription-box-control.spec.js on lines 51..54
          legacy/spec/components/user-subscription-box-control.spec.js on lines 64..67
          legacy/spec/components/user-subscription-box-control.spec.js on lines 75..78
          legacy/spec/components/user-subscription-box-control.spec.js on lines 80..83
          legacy/spec/components/user-subscription-box-control.spec.js on lines 85..88
          legacy/spec/components/user-subscription-box-control.spec.js on lines 90..93

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

          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

              concern: function(description, specDefinitions) {
                  var suite = jasmine.grammar.getEnv().describe(description, specDefinitions);
                  suite.tags = ['concern'];
                  return suite;
              },
          Severity: Major
          Found in legacy/spec/lib/jasmine-species/jasmine-grammar.js and 2 other locations - About 1 hr to fix
          legacy/spec/lib/jasmine-species/jasmine-grammar.js on lines 132..136
          legacy/spec/lib/jasmine-species/jasmine-grammar.js on lines 154..158

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

          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

              matchers.toBeTrue = function() {
                  return this.actual === true || this.actual instanceof Boolean && this.actual.valueOf() === true;
              };
          Severity: Major
          Found in legacy/spec/lib/jasmine-matchers.js and 1 other location - About 1 hr to fix
          legacy/spec/lib/jasmine-matchers.js on lines 195..197

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

          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

              matchers.toBeFalse = function() {
                  return this.actual === false || this.actual instanceof Boolean && this.actual.valueOf() === false;
              };
          Severity: Major
          Found in legacy/spec/lib/jasmine-matchers.js and 1 other location - About 1 hr to fix
          legacy/spec/lib/jasmine-matchers.js on lines 187..189

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

          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

                                              !_.isEmpty(state.vm.submissionError()) ? m('.card.card-error.u-radius.zindex-10.u-marginbottom-30.fontsize-smaller', m('.u-marginbottom-10.fontweight-bold', m.trust(state.vm.submissionError()))) : '',
          Severity: Major
          Found in legacy/src/c/payment-slip.js and 1 other location - About 1 hr to fix
          legacy/src/c/payment-credit-card.js on lines 460..466

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

          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