ablanco/yith-library-web-client

View on GitHub
yithwebclient/static/js/prod/yith-1.1.1.js

Summary

Maintainability
F
1 mo
Test Coverage

File yith-1.1.1.js has 840 lines of code (exceeds 250 allowed). Consider refactoring.
Open



// Source: yithwebclient/static/js/app.js


Severity: Major
Found in yithwebclient/static/js/prod/yith-1.1.1.js - About 2 days to fix

    Function processedPasswordList has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            processedPasswordList: Ember.computed("@each", "activeFilters.@each", function () {
                var filters = this.activeFilters,
                    that = this,
                    result;
    
    
    Severity: Minor
    Found in yithwebclient/static/js/prod/yith-1.1.1.js - About 1 hr to fix

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

              save: function ($form) {
                  if (this.validate($form)) {
                      var data = this.getFormData($form, (new Date()).getTime()),
                          that = this,
                          modal,
      Severity: Minor
      Found in yithwebclient/static/js/prod/yith-1.1.1.js - About 1 hr to fix

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

                cipher: function (masterPassword, secret, masterModal, indexCtrl, notEnforce) {
        Severity: Minor
        Found in yithwebclient/static/js/prod/yith-1.1.1.js - About 35 mins to fix

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

          (function (Yith, Ember) {
              "use strict";
          
              Yith.PasswordsNewController = Ember.ObjectController.extend({
                  modifySecret: true,
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 1 wk to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 423..661
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 438..676

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

          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

          (function (Yith, Ember, sjcl, host) {
              "use strict";
          
              Yith.ViewsUtils = {
                  cipher: function (masterPassword, secret, masterModal, indexCtrl, notEnforce) {
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 1 wk to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 683..872
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 701..890

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

          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

          (function (Yith, Ember) {
              "use strict";
          
              Yith.ControllersUtils = {
                  oneDayInMilliseconds: 86400000,
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 1 wk to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 250..402
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 262..414

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

          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

          (function (Yith, Ember) {
              "use strict";
          
              Yith.SecretGroup = Ember.View.extend({
                  templateName: "secret-group",
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 1 wk to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 1022..1158
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 1046..1182

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

          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

          (function (Yith, Ember) {
              "use strict";
          
              Yith.ServiceButton = Ember.View.extend({
                  tagName: "button",
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 5 days to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 894..1000
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 915..1021

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

          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

          (function (Yith, Ember) {
              "use strict";
              // Wait until we have the access code
              Yith.deferReadiness();
          
          
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 3 other locations - About 4 days to fix
          yithwebclient/static/js/app.js on lines 22..101
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 22..101
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 25..104

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

          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

          (function (Yith, Ember) {
              "use strict";
          
              Yith.SettingsObject = Ember.Object.extend({
                  disableCountdown: false,
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 2 days to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 122..171
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 128..177

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

          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

          (function (Yith, Ember, DS, host, clientId) {
              "use strict";
          
              Yith.Password = DS.Model.extend({
                  account: DS.attr(),
          Severity: Major
          Found in yithwebclient/static/js/prod/yith-1.1.1.js and 2 other locations - About 2 days to fix
          yithwebclient/static/js/prod/yith-1.1.0.js on lines 191..229
          yithwebclient/static/js/prod/yith-1.1.2.js on lines 200..238

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

          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